30#define ARG_COMPRESS "--compression"
31#define ARG_VARIANT_PACKAGING "--variant-packaging"
32#define ARG_ORIGIN "--origin"
33#define ARG_PRODUCT_NAME "--product-name"
42 m_argParser.add_description( std::string(
"Export the PCB in ODB++ format" ) );
45 .default_value( std::string(
"zip" ) )
46 .help( std::string(
"Compression mode" ) )
47 .choices(
"none",
"zip",
"tgz" );
50 .default_value( std::string(
"separate" ) )
51 .help( std::string(
"Package variants separately or together" ) )
52 .choices(
"separate",
"combined" );
55 .default_value( std::string(
"absolute" ) )
56 .help( std::string(
"Coordinate origin" ) )
57 .choices(
"absolute",
"aux",
"grid" );
60 .default_value( std::string() )
61 .help( std::string(
"ODB++ product model name" ) )
76 if( !wxFile::Exists( job->m_filename ) )
78 wxFprintf( stderr,
_(
"Board file does not exist or is not accessible\n" ) );
84 if( compression ==
"zip" )
86 else if( compression ==
"tgz" )
88 else if( compression ==
"none" )
98 else if( origin ==
"grid" )
std::map< wxString, wxString > m_argDefineVars
Value of the drawing sheet arg if configured.
argparse::ArgumentParser m_argParser
void addDefineArg()
Set up the drawing sheet arg used by many of the export commands.
void addVariantsArg(bool aRequireOutputToken=true)
Set up the list of variants to output arguement.
wxString m_argOutput
Value of the output arg if configured.
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, PROGRESS_REPORTER *aProgressReporter=nullptr)
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
#define ARG_VARIANT_PACKAGING
static wxString From_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.
This file contains miscellaneous commonly used macros and functions.
static const int ERR_INVALID_INPUT_FILE
std::vector< FAB_LAYER_COLOR > dummy
PCB_EXPORT_BASE_COMMAND(const std::string &aName, IO_TYPE aInputType=IO_TYPE::FILE, IO_TYPE aOutputType=IO_TYPE::FILE)
void applyFabExportArgs(JOB_EXPORT_PCB_FAB &aJob)
void addFabExportArgs(const JOB_EXPORT_PCB_FAB &aJob, const std::string &aDataSetAlias={})
aJob says which data sets the format supports aDataSetAlias is a second name for the flag