ROOM » Utilities » XschemImporter

XschemImporter Class

Imports Xschem .sch / .sym into a Database. More…

Header:#include "xschem_importer.h"
CMake:target_link_libraries(mytarget PRIVATE ROOM::room_utils)

Public Types

struct OptionsLibrary name, cell override, update flag.

Public Functions

Database importFile(path) constNew database from file.
Database importFileInto(db, path) constMerge into existing database.
warnings(), errors()Messages from last import.

Detailed Description

Parsing uses room::xschem::readRecords / importRecords (xschem_io). Sets dbuPerEditorUnit = 1000 and SourceInfo with format = xschem. Schematic wires map to Net/Term; instances use Shape::Arc where applicable. See coordinate scale.

CLI: xschem_to_room — see Xschem example.

struct Options

MemberDefaultDescription
libName"xschem"Output library name.
cellNameemptyOverride cell name (else from filename).
updateExistingtrueReplace cell when merging.

Example

room::XschemImporter importer;
room::Database db = importer.importFile("test.sch");
db.saveToFile("test.schematic.room", room::ViewType::Schematic);