45 const std::map<std::string, UTF8>* aProperties )
47 wxASSERT( !aFileName || aSchematic );
53 wxCHECK_MSG( aSchematic->
IsValid(),
nullptr,
"Can't append to a schematic with no root!" );
54 rootSheet = &aSchematic->
Root();
60 aSchematic->
SetRoot( rootSheet );
73 wxCHECK_MSG( libTable,
nullptr,
"Could not load symbol lib table." );
77 ltspiceDataDir.AppendDir( wxS(
"LTspice" ) );
78 ltspiceDataDir.AppendDir( wxS(
"lib" ) );
80 if( !ltspiceDataDir.DirExists() )
84 ltspiceDataDir.RemoveLastDir();
85 ltspiceDataDir.AppendDir( wxS(
"LTspice" ) );
86 ltspiceDataDir.AppendDir( wxS(
"lib" ) );
89 if( !ltspiceDataDir.DirExists() )
94 wxFileName::GetPathSeparator() +
"LTspice*", wxDIR );
96 while( !foundFile.empty() )
98 ltspiceDataDir = wxFileName(foundFile, wxEmptyString);
99 ltspiceDataDir.AppendDir( wxS(
"lib" ) );
101 if( ltspiceDataDir.DirExists() )
104 foundFile = wxFindNextFile();
REPORTER * m_reporter
Reporter to log errors/warnings to, may be nullptr.
PROGRESS_REPORTER * m_progressReporter
Progress reporter to track the progress of the operation, may be nullptr.
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
schematic PLUGIN for LTspice (*.asc) and (.asy) format.
SCH_SHEET * LoadSchematicFile(const wxString &aFileName, SCHEMATIC *aSchematic, SCH_SHEET *aAppendToMe=nullptr, const std::map< std::string, UTF8 > *aProperties=nullptr) override
Load information from some input file format that this SCH_IO 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.