EESchema appendix
1 - Library files format
Headings:
1 - Library files format
1.1 - Heading
1.2 - Description of a component
1.2.1 - Description of Alias
1.2.2 - Description of the fields
1.2.3 - Description of the graphic elements
1.2.3.1 - Polygon :
1.2.3.2 - Rectangle
1.2.3.3 - Ring
1.2.3.4 - Arc of circle
1.2.3.5 - Text field
1.2.4 - Description of the pins
1.1 - Heading
format:
EESchema-LIBRARY Version 2.0 24/1/1997-18:9:6
description of the components
# End Library
1.2 - Description of a component
The format is as follows :
DEF
name reference 0 40
ALIAS
name1 name2…
fields list
DRAW
list graphic elements and pins
ENDDRAW
ENDDEF
Example:
DEF BNC P 0 40 Y NR 1 0 NR
F0 “P” 10.120 60 H V
F1 “BNC” 110 - 60 40 V V
DRAW
C 0 0 70 0 1 0
C 0 0 20 0 1 0
X Ext. 2 0 - 200 130 U 40 40 1 1 P
X In 1 - 150 0.130 R 40 40 1 1 P
ENDDRAW
ENDDEF
1.2.1 - Description of Alias
This line exists only if the component has alias names.
format:
ALIAS
name1 name2 name3…
1.2.2 - Description of the fields
format:
F
n “
text” posx posy dimension orientation visibility
with:
n = field number :
reference = 0.
value = 1.
n = 2..9 = fields 1 to 8.
Pcb FootPrint = 10.
Diagram name = 11.
orientation = H (horizontal) or V (vertical).
Visibility = V (visible) or I (invisible).
Example:
DEF DIODE D 0 40 Y NR 1 0 NR
F0 “D” 0.100 50 H V
F1 “DIODE” 0 - 100 50 H V
1.2.3 - Description of the graphic elements
There are of 5 types:
- Polygon (succession of segments), filled or normal.
- Rectangle.
- Circle.
- Arc of circle.
- Text.
1.2.3.1 - Polygon :
Format:
P
Nb parts convert ltrait x0 y0 x1 y1 xi yi DC
With:
Nb = a number of points.
unit = 0 if common to the parts; if not, number of part (1. .n).
convert = 0 if common to the 2 representations, if not 1 or 2.
trait
= line thickness (always 0).
xi yi coordinates of end i.
DC = F if polygon is filled; if not, nothing.
Example:
P 3 0 1 0 - 50 50 50 0 - 50 - 50 F
P 2 0 1 0 50 50 50 - 50
1.2.3.2 - Rectangle
Format:
S
startx starty endx endy unit convert ltrait
With
unit = 0 if common to the parts; if not, number of part (1. .n).
convert = 0 if common to the representations; if not, 1 or 2.
ltrait = thickness (always 0).
Example:
S 0 50.900.900 0 1 0
1.2.3.3 - Ring
Format:
C
posx posy radius unit convert ltrait
With
unit = 0 if common to the parts; if not, number of part (1. .n).
convert = 0 so common to the representations, if not 1 or 2.
ltrait = thickness (always 0).
Example:
C 0 0 70 0 1 0
C 0 0 20 0 1 0
1.2.3.4 - Arc of circle
Format:
With
posx posy radius start end part convert ltrait start_pointX start_pointY end_pointX end_pointY
With:
start =
angle
of the starting point (in 0,1 degrees).
end =
angle
of the end point (in 0,1 degrees).
unit = 0 so common to the parts; if not, number of part (1. .n).
convert = 0 if common to the representations, if not 1 or 2.
ltrait = thickness (always 0).
start_pointX start_pointY = coord of the starting point (role similar to start)
end_pointX end_pointY = coord of the point of arrival (role similar to end)
Example:
To 0.148 48 - 889 889 0 1 0
To 0 51 51 - 889 889 0 1 0
1.2.3.5 - Text field
Format:
T
orientation
posx posy dimension unit convert Text
With:
orientation = horizontal orientation (=0) or vertical (=1).
type = always 0.
unit = 0 so common to the parts, if not number of part (1. .n).
convert = 0 if common to the representations, if not 1 or 2.
Example:
T 0 - 320 - 10 100 0 0 1 VREF
1.2.4 - Description of the pins
Format:
X
name number posx posy lenght orientation Snum Snom unit convert Etype [shape]
.
With:
orientation
= U (up) D (down) R (right) L (left).
name = name (without space) of the pin. if ~: no name
number = n pin number (4 characters maximum).
length = pin length.
Snum = pin number text size.
Snom = pin name text size.
unit = 0 if common to the parts; if not, number of part (1. .n).
convert = 0 so common to the representations, if not 1 or 2.
Etype = electric type (1 character)
shape = if present: pin shape (clock, inversion…).
Example:
X TO 1 - 200 0.150 R 40 40 1 1 P
X K 2.200 0.150 L 40 40 1 1 P
X 0 1 0 0 0 R 40 40 1 1 W NR
X ~ 2 0 - 250 200 U 40 40 1 1 P
Appendix 2 : Library files format Page 14 -
1