38 return wxT(
"LTspice Schematic Importer" );
52 wxASSERT( !aFileName || aSchematic );
58 wxCHECK_MSG( aSchematic->
IsValid(),
nullptr,
"Can't append to a schematic with no root!" );
59 rootSheet = &aSchematic->
Root();
65 aSchematic->
SetRoot( rootSheet );
78 wxCHECK_MSG( libTable,
nullptr,
"Could not load symbol lib table." );
82 ltspiceDataDir.AppendDir( wxS(
"LTspice" ) );
83 ltspiceDataDir.AppendDir( wxS(
"lib" ) );
85 if( !ltspiceDataDir.DirExists() )
89 ltspiceDataDir.RemoveLastDir();
90 ltspiceDataDir.AppendDir( wxS(
"LTspice" ) );
91 ltspiceDataDir.AppendDir( wxS(
"lib" ) );
94 if( !ltspiceDataDir.DirExists() )
99 while( !foundFile.empty() )
101 ltspiceDataDir = wxFileName(foundFile, wxEmptyString);
102 ltspiceDataDir.AppendDir( wxS(
"lib" ) );
104 if( ltspiceDataDir.DirExists() )
107 foundFile = wxFindNextFile();
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
void Load(SCHEMATIC *aSchematic, SCH_SHEET *aRootSheet, const wxFileName &aLibraryFileName, REPORTER *aReporter)
The main function responsible for loading the .asc and .asy files.
static SYMBOL_LIB_TABLE * SchSymbolLibTable(PROJECT *aProject)
Accessor for project symbol library table.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
Holds all the data relating to one schematic.
SCH_SHEET_PATH & CurrentSheet() const override
void SetRoot(SCH_SHEET *aRootSheet)
Initialize the schematic with a new root sheet.
bool IsValid() const
A simple test if the schematic is loaded, not a complete one.
PROJECT & Prj() const override
Return a reference to the project this schematic is part of.
int GetModifyHash() const override
Return the modification hash from the library cache.
PROGRESS_REPORTER * m_progressReporter
const wxString GetName() const override
schematic PLUGIN for LTspice (*.asc) and (.asy) format.
SCH_SHEET * LoadSchematicFile(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const STRING_UTF8_MAP *aProperties=nullptr) override
Load information from some input file format that this SCH_PLUGIN implementation knows about,...
void SetFileName(const wxString &aFileName)
Set the file name for this screen to aFileName.
void UpdateAllScreenReferences() const
Update all the symbol references for this sheet path.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetFileName(const wxString &aFilename)
SCH_SCREEN * GetScreen() const
void SetScreen(SCH_SCREEN *aScreen)
Set the SCH_SCREEN associated with this sheet to aScreen.
A name/value tuple with unique names and optional values.