Borrow LTSpice's unconnected net nomenclature.

Using an unqualified "?" results in all the unconnected pins
being connected to each other.

Fixes: lp:1720619
* https://bugs.launchpad.net/kicad/+bug/1720619
This commit is contained in:
Jeff Young 2018-04-07 01:25:02 +01:00
parent be4d7987d3
commit 0bd5cc4470
1 changed files with 4 additions and 1 deletions

View File

@ -92,6 +92,8 @@ bool NETLIST_EXPORTER_PSPICE::Format( OUTPUTFORMATTER* aFormatter, unsigned aCtl
aFormatter->Print( 0, ".include \"%s\"\n", (const char*) full_path.c_str() );
}
unsigned int NC_counter = 1;
for( const auto& item : m_spiceItems )
{
if( !item.m_enabled )
@ -130,8 +132,9 @@ bool NETLIST_EXPORTER_PSPICE::Format( OUTPUTFORMATTER* aFormatter, unsigned aCtl
// Replace parenthesis with underscore to prevent parse issues with simulators
ReplaceForbiddenChars( netName );
// Borrow LTSpice's nomenclature for unconnected nets
if( netName.IsEmpty() )
netName = wxT( "?" );
netName = wxString::Format( wxT( "NC_%.2u" ), NC_counter++ );
aFormatter->Print( 0, "%s ", TO_UTF8( netName ) );
}