BOM Export: add DNP to Group By * defaults

Closer to the BOM export scripts we are trying to replace, and gives the
user a clue that fields with variables names are way to export other
data.
This commit is contained in:
Mike Williams 2023-07-12 11:51:30 -04:00
parent 7cb8d3d1c9
commit 265720ec65
3 changed files with 7 additions and 5 deletions

View File

@ -137,6 +137,7 @@ BOM_PRESET BOM_PRESET::GroupedByValue()
{ "Datasheet", "Datasheet", true, false },
{ "Footprint", "Footprint", true, false },
{ "Quantity", "Qty", true, false },
{ "${DNP}", "DNP", true, true },
};
return p;
@ -155,6 +156,7 @@ BOM_PRESET BOM_PRESET::GroupedByValueFootprint()
{ "Datasheet", "Datasheet", true, false },
{ "Footprint", "Footprint", true, true },
{ "Quantity", "Qty", true, false },
{ "${DNP}", "DNP", true, true },
};
return p;

View File

@ -326,7 +326,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportBom( JOB* aJob )
field.name )
!= aBomJob->m_fieldsGroupBy.end();
field.label =
( ( aBomJob->m_fieldsLabels.size() < i ) && !aBomJob->m_fieldsLabels[i].IsEmpty() )
( ( aBomJob->m_fieldsLabels.size() > i ) && !aBomJob->m_fieldsLabels[i].IsEmpty() )
? aBomJob->m_fieldsLabels[i]
: field.name;

View File

@ -33,16 +33,16 @@ CLI::EXPORT_SCH_BOM_COMMAND::EXPORT_SCH_BOM_COMMAND() : EXPORT_PCB_BASE_COMMAND(
{
// Field output options
m_argParser.add_argument( ARG_FIELDS )
.help( UTF8STDSTR( _( ARG_FIELDS ) ) )
.default_value( std::string( "Reference,Value,Footprint,Quantity" ) );
.help( UTF8STDSTR( _( ARG_FIELDS_DESC ) ) )
.default_value( std::string( "Reference,Value,Footprint,Quantity,${DNP}" ) );
m_argParser.add_argument( ARG_LABELS )
.help( UTF8STDSTR( _( ARG_LABELS_DESC ) ) )
.default_value( std::string( "Refs,Value,Footprint,Qty" ) );
.default_value( std::string( "Refs,Value,Footprint,Qty,DNP" ) );
m_argParser.add_argument( ARG_GROUP_BY )
.help( UTF8STDSTR( _( ARG_GROUP_BY_DESC ) ) )
.default_value( std::string( "Value,Footprint" ) );
.default_value( std::string( "Value,Footprint,${DNP}" ) );
m_argParser.add_argument( ARG_SORT_FIELD )
.help( UTF8STDSTR( _( ARG_SORT_FIELD_DESC ) ) )