diff --git a/eeschema/erc.cpp b/eeschema/erc.cpp index e136448bb8..ce402c5e43 100644 --- a/eeschema/erc.cpp +++ b/eeschema/erc.cpp @@ -1030,15 +1030,28 @@ int ERC_TESTER::TestSimModelIssues() for( SCH_ITEM* item : sheet.LastScreen()->Items().OfType( SCH_SYMBOL_T ) ) { + SCH_SYMBOL* symbol = static_cast( item ); + + // Power symbols and other symbols which have the reference starting with "#" are + // not included in simulation + if( symbol->GetRef( &sheet ).StartsWith( '#' ) + || symbol->GetFieldText( SIM_ENABLE_FIELD ) == wxT( "0" ) ) + { + continue; + } + // Reset for each symbol msg.Clear(); - SCH_SYMBOL* symbol = static_cast( item ); SIM_LIBRARY::MODEL model = libMgr.CreateModel( &sheet, *symbol ); if( !msg.IsEmpty() ) { std::shared_ptr ercItem = ERC_ITEM::Create( ERCE_SIMULATION_MODEL ); + + //Remove \n and \r at e.o.l if any: + msg.Trim(); + ercItem->SetErrorMessage( msg ); ercItem->SetItems( symbol );