- Qucs -
Quite Universal Circuit Simulator

Schematic File Format

This document describes the schematic file format of Qucs.
This format is used for schematics (usually with suffix ".sch")
and for data displays (usually with suffix ".dpl").
The following text shows a short example of a schematic file.

Symbol

This section starts with "<Symbol>" and ends with
"</Symbol>". It contains painting elements creating a
schematic symbol for the file. This is usually only used for
schematic files that meant to be a subcircuit.

Components

This section starts with "<Components>" and ends with
"</Components>". It contains the circuit components of the
schematic. The line format is as follows:
<type name active x y xtext ytext mirrorX rotate "Value1" visible "Value2" visible ...>

The type identifies the component, e.g. "R" for a resistor, "C" for
a capacitor.

The name is the unique component identifier of the schematic, e.g. "R1"
for the first resistor.

A "1" in the active field shows that the component is active, i.e
it is used in the simulation. A "0" shows it is inactive.

The next two numbers are the x and y coordinates of the component
center.

The next two numbers are the x and y coordinates of the upper left
corner of the component text. They are relative to the component center.

The next two numbers indicate the mirroring about the x axis ("1" for
mirrored, "0" for not mirrored) and the counter-clockwise rotation
(multiple of 90 degree, i.e. 0...3).

The next entries are the values of the component properties (in
quotation marks) followed by an 1 if the property is visible on the
schematic (otherwise 0).

Wires

This section starts with "<Wires>" and ends with
"</Wires>". It contains the wires (electrical connection
between circuit components) and their labels and node sets. The
line format is as follows:
<x1 y1 x2 y2 "label" xlabel ylabel dlabel "node set">

The first four numbers are the coordinates of the wire in pixels:
x coordinate of starting point, y coordinate of starting point,
x coordinate of end point and y coordinate of end point. All wires
must be either horizontal (both x coordinates equal) or vertical
(both y coordinates equal).

The first string in quotation marks is the label name. It is
empty if the user has not set a label on this wire.

The next two numbers are the x and y coordinates of the label
or zero if no label exists.

The next number is the distance between the wire starting point
and and the point where the label is set on the wire.

The last string in quotation marks is the node set of the wire,
i.e. the initial voltage at this node used by the simulation
engine to find the solution. This is empty if the user has not set
a node set for this wire.