30#include <wx/tokenzr.h>
34#define ARG_USE_CONTOURS "--use-contours"
35#define ARG_OUTPUT_UNITS "--output-units"
36#define ARG_USE_DRILL_ORIGIN "--use-drill-origin"
37#define ARG_MODE_SINGLE "--mode-single"
38#define ARG_MODE_MULTI "--mode-multi"
49 .help(
UTF8STDSTR(
_(
"Exclude the reference designator text" ) ) )
53 .help(
UTF8STDSTR(
_(
"Exclude the value text" ) ) )
57 .help(
UTF8STDSTR(
_(
"Plot graphic items using their contours" ) ) )
61 .help(
UTF8STDSTR(
_(
"Plot using the drill/place file origin" ) ) )
65 .help(
UTF8STDSTR(
_(
"Include the border and title block" ) ) )
69 .default_value( std::string(
"in" ) )
70 .help(
UTF8STDSTR(
_(
"Output units, valid options: mm, in" ) ) )
79 .default_value( std::string() )
81 _(
"Layers to include on each plot, comma separated list of untranslated "
82 "layer names to include such as "
84 .metavar(
"COMMON_LAYER_LIST" );
88 _(
"Generates a single file with the output arg path acting as the complete "
89 "directory and filename path. COMMON_LAYER_LIST does not function in this "
90 "mode. Instead LAYER_LIST controls all layers plotted." ) ) )
94 .help(
UTF8STDSTR(
_(
"Generates one or more files with behavior similar to the KiCad "
95 "GUI plotting. The given output path specifies a directory in "
96 "which files may be output." ) ) )
113 dxfJob->m_filename = m_argInput;
114 dxfJob->SetConfiguredOutputPath( m_argOutput );
115 dxfJob->m_drawingSheet = m_argDrawingSheet;
116 dxfJob->SetVarOverrides( m_argDefineVars );
118 if( !wxFile::Exists( dxfJob->m_filename ) )
120 wxFprintf( stderr,
_(
"Board file does not exist or is not accessible\n" ) );
126 dxfJob->m_plotGraphicItemsUsingContours = m_argParser.get<
bool>(
ARG_USE_CONTOURS );
136 if( units == wxS(
"mm" ) )
140 else if( units == wxS(
"in" ) )
146 wxFprintf( stderr,
_(
"Invalid units specified\n" ) );
150 dxfJob->m_printMaskLayer = m_selectedLayers;
154 dxfJob->m_printMaskLayersToIncludeOnAllLayers = convertLayerStringList( layers, blah );
162 wxFprintf( stdout, wxT(
"\033[33;1m%s\033[0m\n" ),
163 _(
"This command has deprecated behavior as of KiCad 9.0, the default behavior "
164 "of this command will change in a future release." ) );
166 wxFprintf( stdout, wxT(
"\033[33;1m%s\033[0m\n" ),
167 _(
"The new behavior will match --mode-multi" ) );
argparse::ArgumentParser m_argParser
void addDefineArg()
Set up the drawing sheet arg used by many of the export commands.
void addDrawingSheetArg()
Set up the drawing sheet arg used by many of the export commands.
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
int ProcessJob(KIWAY::FACE_T aFace, JOB *aJob, REPORTER *aReporter=nullptr)
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
#define ARG_INCLUDE_BORDER_TITLE
#define ARG_COMMON_LAYERS
#define ARG_EXCLUDE_REFDES
#define ARG_PLOT_INVISIBLE_TEXT_DESC
#define ARG_PLOT_INVISIBLE_TEXT
#define ARG_EXCLUDE_VALUE
#define ARG_DRILL_SHAPE_OPTION_DESC
#define ARG_USE_DRILL_ORIGIN
#define ARG_DRILL_SHAPE_OPTION
This file contains miscellaneous commonly used macros and functions.
static const int ERR_ARGS
static const int ERR_INVALID_INPUT_FILE
std::vector< FAB_LAYER_COLOR > dummy
wxString From_UTF8(const char *cstring)
int doPerform(KIWAY &aKiway) override
The internal handler that should be overloaded to implement command specific processing and work.
void addLayerArg(bool aRequire)