All coords are in mils (1/1000 or an inch).
Origin is in lower left hand corner.
Files should end in either .sch or .sym
^ ^ | | | y | +--------> 0,0 x->Origin in the lower left hand corner. X increases going to the right. Y increase going up. Coordinate system is landscape and corresponds to a sheet of paper turned on its side.
The object type letter must start in the first column. Schematic/Symbol files are case sensitive.
Version number
Example:
v 19990327
type versionnumber
Components
Example:
C 18600 19900 1 0 0 7400-1.sym
type x y selectable angle mirror basename
Text
Example:
T 16900 35800 3 10 1 0 0
I'm a string!
type x y color size visibility show_name_value angle
string
Net
Bus
Pin
Line
N 12700 29400 32900 29400 4
P 17800 33100 22300 33100 1
L 27300 37400 37200 35300 3
U 27300 37400 37200 35300 3
type x1 y1 x2 y2 color
Arc
Example:
A 0 500 400 -50 90 3
type x y radius start_angle sweep_angle color
Box
Example:
B 300 300 1400 2900 3
type x y width height color
Circle
Example:
V 250 700 50 6
type x y radius color
Special font definition object
Example:
F A 29
type character width [optional_flag]
This is a special tag and should ONLY show up in font definition files. The space character is special and is defined as follows:
F _ 11 1
The last one signifies that this definition is the space character.
Attributes are enclosed in { } and can only be text. Attributes are text items which take on the form name=value. If it doesn't have name=value it's not an attribute. Attributes are attached to the previous object. Here's an example:
P 988 500 1300 500 1
{
T 1000 550 5 8 1 1 0
pin3=3
}
The object is a pin which has an attribute pin3=3 (name=value). You can have multiple text objects (both the T ... and text string are required) in between the { }
You can also have "toplevel" attributes. These attributes are not attached to any object, but instead are just text objects that take on the form name=value. These attributes are useful when you need to convey some info about a schematic page and need the netlister to have access to this info.
Embedded objects take on the following form:
C 18600 21500 1 0 0 EMBEDDED555-1.sym
[
...
... Embedded primitive objects
...
]
Where the basename is EMBEDDEDcomponent_name.sym In the example above 555-1.sym is the basename. The EMBEDDED tag and the [ ] are the distinguishing characteristics of embedded components. component_name.sym must exist in one of the specified component-libraries if you want to unembed a component.
Currently, nets and other components should NOT be inside components.
gschem and friends do not like bad schematic/symbol files, ie file syntax checking is non-existent and gschem and friends will exit if they find an invalid file.