Ensure exported spice netlist contains all spice directives found in schematic

This commit is contained in:
jean-pierre charras 2022-12-08 09:44:48 +01:00
parent 2b0d7f65d0
commit 0098dfa6dc
2 changed files with 5 additions and 1 deletions

View File

@ -508,6 +508,8 @@ bool NETLIST_DIALOG::TransferDataFromWindow()
{
case NET_TYPE_SPICE:
// Set spice netlist options:
netlist_opt |= NETLIST_EXPORTER_SPICE::OPTION_SIM_COMMAND;
if( currPage->m_SaveAllVoltages->GetValue() )
netlist_opt |= NETLIST_EXPORTER_SPICE::OPTION_SAVE_ALL_VOLTAGES;
if( currPage->m_SaveAllCurrents->GetValue() )

View File

@ -201,6 +201,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportNetlist( JOB* aJob )
std::unique_ptr<NETLIST_EXPORTER_BASE> helper;
unsigned netlistOption = 0;
wxString fileExt;
@ -223,6 +224,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportNetlist( JOB* aJob )
case JOB_EXPORT_SCH_NETLIST::FORMAT::SPICE:
fileExt = SpiceFileExtension;
netlistOption = NETLIST_EXPORTER_SPICE::OPTION_SIM_COMMAND;
helper = std::make_unique<NETLIST_EXPORTER_SPICE>( sch );
break;
@ -250,7 +252,7 @@ int EESCHEMA_JOBS_HANDLER::JobExportNetlist( JOB* aJob )
aNetJob->m_outputFile = fn.GetFullName();
}
bool res = helper->WriteNetlist( aNetJob->m_outputFile, 0, *this );
bool res = helper->WriteNetlist( aNetJob->m_outputFile, netlistOption, *this );
if(!res)
{