Creating / editing schematics

Launching the schematic editor from the GUI

The Structured Electronic Design Environment interfaces with both SLiCAP and NGspice. Although schematics for both applications may look similar, models and component attributes differ for both applications. SLiCAP is intended for symbolic analysis of linear continuous-time, dynamic circuits, whereas NGspice supports numeric analysis of nonlinear, time-variant, dynamic circuits. For this reason, The GUI uses different symbol sets and libraries for SLiCAP and NGspice. SLiCAP schematic files use the file extension .slicap_sch and NGspice schematics use .spice_sch as file extension.

The schematic edditor can be started as follows:

  1. From the main menu select File -> New SLiCAP Schematic

  2. From the main menu select File -> New NGspice Schematic

  3. From the main menu select File -> Open schematic

Below the screenshot after creating a new SLiCAP schematic.

../../_images/new_schematic.png

After saving it as “my_circuit.slicap_sch” it becomes visible in the Project panel (in the .sch folder):

../../_images/my_circuit.png

Launching the schematic editor from outside the GUI

From a Python session or Jupyter notebook (the usual way):

import SLiCAP as sl
sl.initProject("My Design")

sl.startSchematic()                                # empty editor; choose type from the File menu
sl.startSchematic(config='basic')                  # SLiCAP basic-symbol capture mode
sl.startSchematic(file='sch/mydesign.slicap_sch')  # open an existing file
sl.startSchematic(config='basic', file='sch/mydesign.slicap_sch')

The call returns immediately; the editor runs as an independent process alongside the Python session (schematic-only: no Instruction/Log panels).

config selects the capture mode. It sets the symbol library and restricts which schematic type may be created or opened:

config

Symbol set loaded

Schematic type

None (default)

chosen per schematic

both SLiCAP and NGspice allowed

'basic'

Symbols.svg only (basic IEC/SLiCAP symbols only)

SLiCAP only (NGspice disabled)

'slicap'

the complete SLiCAP library (all SVG files in the system symbols directory)

SLiCAP only (NGspice disabled)

'ngspice'

the NGspice symbol library

NGspice only (SLiCAP disabled)

In a restricted mode the disallowed File ‣ New … Schematic entry is greyed out and File ‣ Open lists only files of the permitted type.

file is the path to a schematic to open at startup; its type is inferred from the extension (.slicap_sch or .spice_sch). A canvas is shown only when a file is given — otherwise the editor opens empty and you create or open a schematic from the File menu (honouring the capture mode).

From the command line (for scripting or desktop shortcuts):

$ slicap                                                       # full editor, both types
$ slicap-schematics                                            # schematic-only editor, empty
$ slicap-schematics --config basic                             # basic SLiCAP mode, empty
$ slicap-schematics --config ngspice sch/mydesign.spice_sch    # open an NGspice file
$ python -m SLiCAP.schematic.main --schematic-only --config basic

Without a file the editor opens empty; use the File menu to create or open a schematic in the selected mode.

The main window

The schematic menu bar at a glance

By default each schematic is displayed in a separate tab, but each open schematic has its own panel with its own menu bar with actions on that schematic:

Menu

Contents

File

Save schematic (Ctrl+S), Save schematic as (Ctrl+Shift+S), Schematic properties, Export netlist (Ctrl+E), Export SVG, Export PDF, Print schematic (Ctrl+P), Schematic drawing preferences.

Edit

Undo (Ctrl+Z), Redo (Ctrl+Y).

View

Fit (F), Zoom In (+), Zoom Out (-), Reset Zoom (Ctrl+0).

Draw

Line, Rectangle, Circle, Text (T), Hyperlink, LaTeX.

Tools

Rename Components.

Place

Symbol (S), Wire (W), Net Label (L), Junction (J), Border (B), Library, Image, Parameters, Define src / det / lg ref.

Instruction

Create circuit object and Create / edit SLiCAP instruction (SLiCAP schematics), or Create / edit NGspice instruction and control section (NGspice schematics) — see Instructions and Circuit Objects.

Creating and opening schematics, and application-wide actions, live in the main window’s menu bar:

Menu

Contents

File

New project, Select project folder, Save project, Close project; New SLiCAP Schematic, New NGspice Schematic, Open (Ctrl+O); Exit (Ctrl+Q).

Instruction

Create / edit Traces, Axes, Figures and specifications; Run (F5), Stop (F6).

View

Show/hide the Project, Instructions, and Log panels.

Help

Show HTML Documentation (F1), Check for updates, About.

A first schematic in five steps

  1. Place a symbol. Open Place ‣ Symbol… (shortcut S), pick a resistor and click on the canvas to drop it. See Placing Symbols.

  2. Wire it up. Choose Place ‣ Wire (shortcut W) and click from one pin to the next. Unconnected pins show a small grey marker that disappears once a wire reaches them. See Wiring.

  3. Set values. Double-click a component to open its Properties dialog and enter a value (for example R_s for a resistance). See Component Properties.

  4. Mark source and detector. Use Place ‣ Define src / det / lg ref… to designate the independent source and the detector.

  5. Save and export. File ‣ Save schematic writes the .slicap_sch file; File ‣ Export netlist… produces a .cir netlist for SLiCAP. See Netlist & Export.

Below an example of a SLiCAP schematic with default preferences and LaTeX rendering enabled.

../../_images/RCcircuit.png

Sidecar files

A schematic is self-contained: everything it needs to look and behave the same on another machine travels next to it in sch/. Saving my_circuit.slicap_sch creates and maintains a small set of sidecar files with the same base name.

File

Contents

my_circuit.slicap_sch

The schematic itself (components, wires, labels, annotations) — the file you open and save.

my_circuit.ini

This schematic’s style (line widths, colours, fonts), so it always looks as it did when saved. See Preferences.

my_circuit.symbols

Frozen copies of every symbol the schematic uses, so it renders with the exact symbols it was drawn with. See Symbol Libraries.

my_circuit.cache

A cache of rendered LaTeX labels, so re-opening is fast. Created only if the schematic actually contains typeset expressions; safe to delete.

Why sidecar files

  • Portability — copy the .slicap_sch together with its .ini and .symbols to another computer and it looks and netlists identically.

  • Reproducibility — a figure in a book keeps its appearance even if the application’s default symbols or style change later.

  • No clutter — the render cache lives next to the schematic, not in a global folder that quietly grows over time. Deleting a project removes all its files together.

Note

The .ini and .symbols files are part of the project and should be kept (and version-controlled) with the schematic. The .cache directory is regenerated automatically and can be ignored or deleted.