diff --git a/eeschema/netlist_exporters/netlist_exporter_generic.cpp b/eeschema/netlist_exporters/netlist_exporter_generic.cpp index 895ac52926..173365332e 100644 --- a/eeschema/netlist_exporters/netlist_exporter_generic.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_generic.cpp @@ -524,8 +524,11 @@ XNODE* NETLIST_EXPORTER_GENERIC::makeListOfNets() { auto pc = static_cast( item ); - // Skip power symbols - if( (LIB_PART*)( pc->m_pin->GetParent() )->IsPower() ) + auto refText = pc->m_comp->GetRef( &sheet ); + auto pinText = pc->m_pin->GetNumber(); + + // Skip power symbols and virtual components + if( refText[0] == wxChar( '#' ) ) continue; if( !added ) @@ -538,9 +541,6 @@ XNODE* NETLIST_EXPORTER_GENERIC::makeListOfNets() added = true; } - auto refText = pc->m_comp->GetRef( &sheet ); - auto pinText = pc->m_pin->GetNumber(); - xnet->AddChild( xnode = node( "node" ) ); xnode->AddAttribute( "ref", refText ); xnode->AddAttribute( "pin", pinText );