Add a warning message for attempting to current probe a subckt.

Fixes: lp:1843159
* https://bugs.launchpad.net/kicad/+bug/1843159
This commit is contained in:
Jeff Young 2019-09-12 14:44:08 +01:00
parent aeedbf87dd
commit 67915b6a96
1 changed files with 14 additions and 3 deletions

View File

@ -39,7 +39,7 @@ wxString NETLIST_EXPORTER_PSPICE_SIM::GetSpiceVector( const wxString& aName, SIM
// netnames are escaped (can contain "{slash}" for '/') Unscape them:
wxString spicenet = UnescapeString( aName );
// Spice netlist netnames does not accept some chars, whicyh are replaced
// Spice netlist netnames does not accept some chars, which are replaced
// by eeschema netlist generator.
// Replace these forbidden chars to find the actual spice net name
NETLIST_EXPORTER_PSPICE::ReplaceForbiddenChars( spicenet );
@ -49,8 +49,19 @@ wxString NETLIST_EXPORTER_PSPICE_SIM::GetSpiceVector( const wxString& aName, SIM
else if( aType & SPT_CURRENT )
{
return wxString::Format( "@%s[%s]", GetSpiceDevice( aName ).Lower(),
aParam.IsEmpty() ? "i" : aParam.Lower() );
wxString device = GetSpiceDevice( aName ).Lower();
wxString param = aParam.Lower();
if( device[0] == 'x' )
{
return "current probe of .subckt not yet implemented";
}
else
{
return wxString::Format( "@%s[%s]",
device,
param.IsEmpty() ? "i" : param );
}
}
return res;