Direct open: projects, sheets, symbols

Sch-rnd can open and display multiple files and switch between them. All open files are shown in a tree (files sorted under projects) in the sheet selector (sheetsel) widget in the top window (bottom left). A project is a directory; a file is always within a project, regardless of the project having a project file or not.

Files are open using the Load submenu from the File menu or by supplying one or more files on the command line. Files that can be open this way:

It is possible to open multiple different files from different projects (directories). Some of the visual render and all netlist export depend on compiling the project which makes sense only if all relevant files of the project are loaded. How exactly or in what order all files got loaded does not matter.

Opening sheets

Loading sheets directly is common practice when:

If project.lht exists in the same directory as a sheet file, the config section is automatically loaded from project.lht and config settings are applied on the project role. If project.lht lists sheets and not all of them are loaded the compiler will fail.

Opening projects

A normal multisheet project usually has an explicit project file (project.lht) that lists root sheets and optionally aux sheets among with some project config. In this case sch-rnd can open the project file directly, which will create the project in the sheetsel widget and load all root and aux sheets from the project file. This is common when:

More details on different approaches to projects files can be found in the prj_archs pool node

Opening symbols directly (sym edit mode)

Happens only directly, when the file is named explicitly, not via a project file. Useful for making graphical edits in existing symbols. Some alien file formats do not support this, e.g. gEDA (gschem, lepton) because of no file header that would tell a sheet apart from a symbol.

When saving the "sheet" the symbol is saved, always in native format.

Exporting

Exporting from the GUI happens after loading sheet(s), the above loading rules apply. Command line export, sch-rnd -x ... works as expected:

Graphical export (e.g. png or ps) of a single sheet results in a single file, default export file name derived from the sheet file name. Graphical export of multiple sheets is done depending on export plugin capabilities. Some plugins, like export_png, multiple files are exported, one per sheet; with other plugins, like export_ps, all sheets are concatenated into a single multi-page file. Default export file name is derived from the project's name.

Note: export normally takes place only if compilation doesn't fail. This is true even for graphical exports because of dyntext printouts (common for slotting and terminal IDs) have to be computed during compilation.

Loading a symbol into the paste buffer directly

When the File menu, Import, Load symbol/group... submenu is used, a (native format) symbol is loaded into the paste buffer directly. This method bypasses any library search mechanism by providing a file selection dialog that can freely traverse the file system. Once the symbol is placed on the sheet, it is automatically stored in the sheet file (either as an embedded symbol or in the sheet-local library).

Loading symbols from the library

The library is a selection of file system directories hosting symbols in different file formats. Importing library symbols into the paste buffer is possible via the Window menu, Library submenu. The same embedding or sheet-local lib applies as for directly imported symbols.

Hierarchic design: hlibrary, referenced sheets

In case of hierarchic design it is possible that some external sheets are loaded from the hlibrary during compilation as they are referenced from attributes.