89 bool aForceDefaultProject,
PROJECT* aProject,
bool aCalculateConnectivity )
92 return LoadSchematic( aFileName, SCH_IO_MGR::SCH_KICAD, aSetActive, aForceDefaultProject,
93 aProject, aCalculateConnectivity );
95 return LoadSchematic( aFileName, SCH_IO_MGR::SCH_LEGACY, aSetActive, aForceDefaultProject,
96 aProject, aCalculateConnectivity );
99 return LoadSchematic( aFileName, SCH_IO_MGR::SCH_LEGACY, aSetActive, aForceDefaultProject, aProject,
100 aCalculateConnectivity );
105 SCH_IO_MGR::SCH_FILE_T aFormat,
107 bool aForceDefaultProject,
109 bool aCalculateConnectivity )
111 wxFileName pro = aFileName;
114 wxString projectPath = pro.GetFullPath();
127 if( !aForceDefaultProject )
131 if( wxFileExists( projectPath ) )
145 if( !
project || aForceDefaultProject )
153 wxFileName schFile = aFileName;
154 schFile.MakeAbsolute();
158 schematic->
SetRoot( pi->LoadSchematicFile( schFile.GetFullPath(), schematic ) );
169 screen->UpdateLocalLibSymbolLinks();
180 screen->MigrateSimModels();
189 if( aCalculateConnectivity )
202 sheet.UpdateAllScreenReferences();
203 sheet.LastScreen()->TestDanglingEnds(
nullptr,
nullptr );
206 if( aCalculateConnectivity )
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
void Recalculate(const SCH_SHEET_LIST &aSheetList, bool aUnconditional=false, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr, PROGRESS_REPORTER *aProgressReporter=nullptr)
Update the connection graph for the given list of sheets.
static SETTINGS_MANAGER * s_SettingsManager
static void SetSchEditFrame(SCH_EDIT_FRAME *aSchEditFrame)
static SETTINGS_MANAGER * GetSettingsManager()
static SCH_EDIT_FRAME * s_SchEditFrame
static SCHEMATIC * LoadSchematic(const wxString &aFileName, bool aSetActive, bool aForceDefaultProject, PROJECT *aProject=nullptr, bool aCalculateConnectivity=true)
static PROJECT * GetDefaultProject(bool aSetActive)
Instantiate the current locale within a scope in which you are expecting exceptions to be thrown.
Container for project specific data.
Holds all the data relating to one schematic.
void CreateDefaultScreens()
void ResolveERCExclusionsPostUpdate()
Update markers to match recorded exclusions.
void RecomputeIntersheetRefs()
Update the schematic's page reference map for all global labels, and refresh the labels so that they ...
SCH_SHEET_LIST BuildSheetListSortedByPageNumbers() const
void SetRoot(SCH_SHEET *aRootSheet)
Initialize the schematic with a new root sheet.
CONNECTION_GRAPH * ConnectionGraph() const
SCH_SCREEN * RootScreen() const
Helper to retrieve the screen of the root sheet.
void SetSheetNumberAndCount()
Set the m_ScreenNumber and m_NumberOfScreens members for screens.
void RecalculateConnections(SCH_COMMIT *aCommit, SCH_CLEANUP_FLAGS aCleanupFlags, TOOL_MANAGER *aToolManager, PROGRESS_REPORTER *aProgressReporter=nullptr, KIGFX::SCH_VIEW *aSchView=nullptr, std::function< void(SCH_ITEM *)> *aChangedItemHandler=nullptr, PICKED_ITEMS_LIST *aLastChangeList=nullptr)
Generate the connection data for the entire schematic hierarchy.
Schematic editor (Eeschema) main window.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
void FixLegacyPowerSymbolMismatches()
Fix legacy power symbols that have mismatched value text fields and invisible power pin names.
const std::vector< SCH_SYMBOL_INSTANCE > & GetSymbolInstances() const
int GetFileFormatVersionAtLoad() const
const std::vector< SCH_SHEET_INSTANCE > & GetSheetInstances() const
A container for handling SCH_SHEET_PATH objects in a flattened hierarchy.
void UpdateSheetInstanceData(const std::vector< SCH_SHEET_INSTANCE > &aSheetInstances)
Update all of the sheet instance information using aSheetInstances.
void AnnotatePowerSymbols()
Silently annotate the not yet annotated power symbols of the entire hierarchy of the sheet path list.
void UpdateSymbolInstanceData(const std::vector< SCH_SYMBOL_INSTANCE > &aSymbolInstances)
Update all of the symbol instance information using aSymbolInstances.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
bool LoadProject(const wxString &aFullPath, bool aSetActive=true)
Load a project or sets up a new project with a specified path.
PROJECT * GetProject(const wxString &aFullPath) const
Retrieve a loaded project by name.
static const std::string LegacySchematicFileExtension
static const std::string ProjectFileExtension
static const std::string KiCadSchematicFileExtension
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
PROJECT * GetDefaultProject()
std::vector< FAB_LAYER_COLOR > dummy
Definition of file extensions used in Kicad.