|
KiCad PCB EDA Suite
|
Functions | |
| bool | SaveSheetToFile (SCH_SHEET *aSheet, SCHEMATIC &aSchematic, const wxString &aPath) |
| Write a single sheet to disk via SCH_IO. | |
| void | UpdateProjectFile (SCHEMATIC &aSchematic, PROJECT &aProject) |
| Sync schematic metadata into the project file (.kicad_pro) and save it. | |
| bool | SaveSchematic (SCHEMATIC &aSchematic, PROJECT &aProject) |
| Save every screen in the hierarchy to its current path, then update the project file. | |
| bool | SaveSchematicCopy (SCHEMATIC &aSchematic, PROJECT &aProject, const wxString &aFileName, bool aCreateProject) |
| Save the root schematic to aFileName without changing the open document. | |
Save every screen in the hierarchy to its current path, then update the project file.
Definition at line 154 of file sch_api_save.cpp.
References SCH_SCREENS::BuildClientSheetPathList(), SCH_SCREEN::GetClientSheetPaths(), SCH_SCREENS::GetCount(), SCH_SCREEN::GetFileName(), SCH_SCREENS::GetScreen(), SCH_SCREENS::GetSheet(), SCHEMATIC::Root(), SCHEMATIC::RootScreen(), SaveSheetToFile(), BASE_SCREEN::SetContentModified(), BASE_SCREEN::SetVirtualPageNumber(), and UpdateProjectFile().
Referenced by HEADLESS_SCH_CONTEXT::SaveSchematic(), SCH_EDIT_FRAME_CONTEXT::SaveSchematic(), and SaveSchematicCopy().
| bool SCH_API_SAVE::SaveSchematicCopy | ( | SCHEMATIC & | aSchematic, |
| PROJECT & | aProject, | ||
| const wxString & | aFileName, | ||
| bool | aCreateProject ) |
Save the root schematic to aFileName without changing the open document.
If aFileName matches the open root schematic, this delegates to SaveSchematic(). Otherwise only the root sheet is written (subsheets are not remapped).
When aCreateProject is true and the destination project file does not exist yet, a copy of the current project is written alongside the new schematic.
Definition at line 197 of file sch_api_save.cpp.
References SCH_SCREEN::GetFileName(), PGM_BASE::GetSettingsManager(), Pgm(), FILEEXT::ProjectFileExtension, SCHEMATIC::Root(), SCHEMATIC::RootScreen(), SETTINGS_MANAGER::SaveProjectCopy(), SaveSchematic(), and SaveSheetToFile().
Referenced by HEADLESS_SCH_CONTEXT::SaveSchematicCopy(), and SCH_EDIT_FRAME_CONTEXT::SaveSchematicCopy().
| bool SCH_API_SAVE::SaveSheetToFile | ( | SCH_SHEET * | aSheet, |
| SCHEMATIC & | aSchematic, | ||
| const wxString & | aPath ) |
Write a single sheet to disk via SCH_IO.
Definition at line 43 of file sch_api_save.cpp.
References SCH_IO_MGR::GuessPluginTypeFromSchPath(), KIPLATFORM::IO::MakeWriteable(), and IO_ERROR::What().
Referenced by SaveSchematic(), and SaveSchematicCopy().
Sync schematic metadata into the project file (.kicad_pro) and save it.
Definition at line 82 of file sch_api_save.cpp.
References SCH_SCREEN::GetFileName(), SCH_SHEET::GetName(), PROJECT::GetProjectFile(), PROJECT::GetProjectPath(), TITLE_BLOCK::GetRevision(), PGM_BASE::GetSettingsManager(), PROJECT_FILE::GetSheets(), SCH_SCREEN::GetTitleBlock(), PROJECT_FILE::GetTopLevelSheets(), SCHEMATIC::GetTopLevelSheets(), SCHEMATIC::HasHierarchy(), SCHEMATIC::Hierarchy(), info, SCH_SHEET::IsVirtualRootSheet(), BASE_SCREEN::m_DrawingSheetFileName, PROJECT_FILE::m_IP2581Bom, SCHEMATIC_SETTINGS::m_SchDrawingSheetFileName, PROJECT_FILE::m_SchematicSettings, EDA_ITEM::m_Uuid, Pgm(), FILEEXT::ProjectFileExtension, SCHEMATIC::RecordERCExclusions(), SCHEMATIC::RefreshHierarchy(), SCHEMATIC::RootScreen(), SETTINGS_MANAGER::SaveProject(), and IP2581_BOM::schRevision.
Referenced by SaveSchematic().