28#define ARG_FORMAT "--format"
29#define ARG_UNITS "--units"
30#define ARG_EXCLUDE_COLOR "--exclude-color"
31#define ARG_EXCLUDE_MATERIAL "--exclude-material"
32#define ARG_EXCLUDE_THICKNESS "--exclude-thickness"
33#define ARG_EXCLUDE_EPSILON_R "--exclude-epsilon-r"
34#define ARG_EXCLUDE_LOSS_TANGENT "--exclude-loss-tangent"
35#define ARG_EXCLUDE_FINISH "--exclude-finish"
36#define ARG_EXCLUDE_BOARD_OPTIONS "--exclude-board-options"
44 .default_value( std::string(
"csv" ) )
45 .
help(
UTF8STDSTR(
_(
"Output file format; valid options: csv, json" ) ) )
49 .default_value( std::string(
"mm" ) )
87 if( !wxFile::Exists( stackupJob->m_filename ) )
89 wxFprintf( stderr,
_(
"Board file does not exist or is not accessible\n" ) );
95 if( format ==
"json" )
99 else if( format ==
"csv" )
105 wxFprintf( stderr,
_(
"Invalid format\n" ) );
111 if( units == wxS(
"mm" ) )
115 else if( units == wxS(
"in" ) || units == wxS(
"inch" ) )
121 wxFprintf( stderr,
_(
"Invalid units specified\n" ) );
133 stackupJob->SetConfiguredOutputPath(
m_argOutput );
argparse::ArgumentParser m_argParser
wxString m_argOutput
Value of the output arg if configured.
wxString m_argInput
Value of the common input arg if configured.
PCB_EXPORT_STACKUP_COMMAND()
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, PROGRESS_REPORTER *aProgressReporter=nullptr)
#define ARG_EXCLUDE_BOARD_OPTIONS
#define ARG_EXCLUDE_FINISH
#define ARG_EXCLUDE_MATERIAL
#define ARG_EXCLUDE_COLOR
#define ARG_EXCLUDE_EPSILON_R
#define ARG_EXCLUDE_LOSS_TANGENT
#define ARG_EXCLUDE_THICKNESS
static const int ERR_ARGS
static const int ERR_INVALID_INPUT_FILE
wxString From_UTF8(const char *cstring)
PCB_EXPORT_BASE_COMMAND(const std::string &aName, IO_TYPE aInputType=IO_TYPE::FILE, IO_TYPE aOutputType=IO_TYPE::FILE)