Symbols: add ${EXCLUDE_FROM_SIM} variable to match the other attributes

This commit is contained in:
Mike Williams 2023-08-01 13:41:49 -04:00
parent df04171234
commit 8fb316f995
2 changed files with 8 additions and 1 deletions

View File

@ -1186,6 +1186,7 @@ void SCH_SYMBOL::GetContextualTextVars( wxArrayString* aVars ) const
aVars->push_back( wxT( "SYMBOL_KEYWORDS" ) );
aVars->push_back( wxT( "EXCLUDE_FROM_BOM" ) );
aVars->push_back( wxT( "EXCLUDE_FROM_BOARD" ) );
aVars->push_back( wxT( "EXCLUDE_FROM_SIM" ) );
aVars->push_back( wxT( "DNP" ) );
}
@ -1328,6 +1329,12 @@ bool SCH_SYMBOL::ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* token, i
: wxString( wxT( "" ) );
return true;
}
else if( token->IsSameAs( wxT( "EXCLUDE_FROM_SIM" ) ) )
{
*token = this->GetExcludeFromSim() ? _( "Excluded from simulation" )
: wxString( wxT( "" ) );
return true;
}
else if( token->IsSameAs( wxT( "DNP" ) ) )
{
*token = this->GetDNP() ? _( "DNP" ) : wxString( wxT( "" ) );