diff --git a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp index 0a731c9f6f..6a4511acb4 100644 --- a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp @@ -89,6 +89,9 @@ bool NETLIST_EXPORTER_PSPICE::Format( OUTPUTFORMATTER* aFormatter, unsigned aCtl for( const auto& item : m_spiceItems ) { + if( !item.m_enabled ) + continue; + aFormatter->Print( 0, "%c%s ", item.m_primitive, (const char*) item.m_refName.c_str() ); // Pins to node mapping diff --git a/eeschema/sim/netlist_exporter_pspice_sim.cpp b/eeschema/sim/netlist_exporter_pspice_sim.cpp index b36c8f1966..c65e1f5582 100644 --- a/eeschema/sim/netlist_exporter_pspice_sim.cpp +++ b/eeschema/sim/netlist_exporter_pspice_sim.cpp @@ -151,6 +151,9 @@ void NETLIST_EXPORTER_PSPICE_SIM::writeDirectives( OUTPUTFORMATTER* aFormatter, for( const auto& current : NETLIST_EXPORTER_PSPICE_SIM::GetCurrents( (SPICE_PRIMITIVE) item.m_primitive ) ) { + if( !item.m_enabled ) + continue; + /// @todo is it required to switch to lowercase aFormatter->Print( 0, ".save %s\n", (const char*) GetSpiceVector( item.m_refName, SPT_CURRENT, current ).c_str() );