Getting Started

Requirements

  • Python 3.10 or newer

  • PySide6 (the Qt 6 bindings)

  • A working SLiCAP installation (used for symbol metadata and for typesetting parameter values)

  • For LaTeX-typeset labels and figure export: pdflatex and dvisvgm (a TeX distribution such as TeX Live). These are optional — without them the editor falls back to plain-text labels.

Launching the editor

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 (standard IEC/SLiCAP set, without e.g. the MOSFET symbol M)

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

Fig. 29 The main window: menu bar, symbol palette (left) and the drawing canvas.

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 symbolic 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.

The menu bar at a glance

Each schematic panel has 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 / edit SLiCAP instruction (SLiCAP schematics) or Create / edit NGspice instruction (NGspice schematics); Run, Stop.

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 plot; Run (F5), Stop (F6).

View

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

Help

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