Class Reference schematicDisplay

The main class of a schematic. More...

Member

sheetList* addSheet()
sheet* currentSheet
void deleteCurrentSheet()
void deleteSheet(sheet *sheet)
sheet* findSheet(string search)
sheetList* firstSheet
string generateNetList(string type,string filename="")
bool modified()
void openFile(string s)
void openView(string library,string cellName,string viewName)
void saveFile(string s)
void saveScreenshot(string filename)
void saveNetList(string filename, string type)
void setModifyChanged()
void setModifyAdded()
void setModifySaved()
void setProbeMode(plotData data)
bool setSheet(string s)
void setSheet(sheet *s)
void scaleFull()
void scaleMinus()
void scalePlus()
void scrollDown()
void scrollLeft()
void scrollRight()
void scrollUp()
void updateNetlist()
void updateCurrentNetlist()
void updateCurrentNetlistDevices()

Detailed Description

graph LR la(schematic)--drawing-->dr(schematicDisplay) dr==firstSheet==>cl(sheetList) dr==currentSheet==>ce cl--thisSheet-->ce(sheet) cl--nextSheet-->cl ce--firstElement-->el(sElementList) click ce "/layoutscript/api/sheet" click cl "/layoutscript/api/sheetlist" click el "/layoutscript/api/selementlist" click la "/layoutscript/api/schematic" click dr "/layoutscript/api/schematicdisplay" classDef thisClas fill:#eaf5fc,stroke:#3c7faa,stroke-width:4px; classDef clas fill:#eaf5fc,stroke:#3c7faa,stroke-width:1px; class dr thisClas class cl,la,el,ce clas

A schematicDisplay is the contents of a schematic window: every sheet and the elements on them. You reach it as schematic->drawing. firstSheet is the linked list of sheets; currentSheet is the sheet on screen. Adding a sheet, generating a netlist, or turning probe mode on all happen here, not on the schematic window class. Load and save work on the whole collection of sheets. After a simulation, setProbeMode takes plotData so clicking a net shows the waveform.

Example:

sheet *s = schematic->drawing->currentSheet;
string net = schematic->drawing->generateNetList("ngspice");

Member Function Documentation


sheetList* schematicDisplay::addSheet()

Adds a new sheet to the list.

Returns: a pointer to the new sheetList node.


sheet schematicDisplay::currentSheet

Pointer to the sheet that is displayed, a sheet.


void schematicDisplay::deleteCurrentSheet()

Deletes the current sheet.


void schematicDisplay::deleteSheet(sheet *sheet)

Deletes the given sheet.


sheet schematicDisplay::findSheet(string search)

Searches for a sheet with the given name.

Returns: the sheet, or NULL if the name is unknown.


sheetList* schematicDisplay::firstSheet

Head of the linked list of all sheets.


string schematicDisplay::generateNetList(string type,string filename="")

Builds a netlist of the current sheet. type must be a netlist format defined in the setup. filename is only written into the netlist text as information.

Parameter:
type netlist format name from the setup
filename optional name stored inside the netlist text

Returns: the netlist as a string.


bool schematicDisplay::modified()

Returns: true if the schematic changed since the last save, otherwise false.


void schematicDisplay::openFile(string s)

Opens schematic file s into this display, replacing the current sheet collection.


void schematicDisplay::openView(string library,string cellName,string viewName)

Opens the given OpenAccess view as a schematic.

Parameter:
library OpenAccess library name
cellName cell name in that library
viewName view name to open as schematic

void schematicDisplay::saveFile(string s)

Saves the current sheet collection to file s.


void schematicDisplay::saveScreenshot(string filename)

Saves the current sheet view to filename. The image type is taken from the file extension. (introduced with release 20260921)


void schematicDisplay::saveNetList(string filename, string type)

Writes the current sheet as a netlist to filename. type must be a netlist format defined in the setup.

Parameter:
filename destination file
type netlist format name from the setup

void schematicDisplay::setModifyChanged()

Marks the schematic as changed. Edit operations already do this; call it yourself after a change the editor would not see.


void schematicDisplay::setModifyAdded()

Marks the schematic as added-to: existing elements were not edited, but new ones were placed. This sits between saved and fully changed.


void schematicDisplay::setModifySaved()

Marks the schematic as unmodified. The unsaved-design warning on exit is then not shown.


void schematicDisplay::setProbeMode(plotData data)

Turns the Schematic Editor into probe mode. Clicking a node, device, or port then starts another macro. That macro receives data together with the clicked object so it can show simulation results.


bool schematicDisplay::setSheet(string s)

Makes the sheet named s current.

Returns: true if that sheet exists, otherwise false.


void schematicDisplay::setSheet(sheet *s)

Makes s the current sheet.


void schematicDisplay::scaleFull()

Zooms the current sheet so that it is completely visible.


void schematicDisplay::scaleMinus()

Zooms out.


void schematicDisplay::scalePlus()

Zooms in.


void schematicDisplay::scrollDown()

Scrolls the current view down.


void schematicDisplay::scrollLeft()

Scrolls the current view left.


void schematicDisplay::scrollRight()

Scrolls the current view right.


void schematicDisplay::scrollUp()

Scrolls the current view up.


void schematicDisplay::updateNetlist()

Extracts netlists on every sheet. Call this after editing sheets so the layout window netlist stays in sync.


void schematicDisplay::updateCurrentNetlist()

Extracts the netlist of the current sheet only.


void schematicDisplay::updateCurrentNetlistDevices()

Updates every device of the currently displayed netlist in the layout window. Call it after changing parameters of existing devices or after adding a device from a macro.