## File format root nodes

Each table below describes the full tree of one of the pcb-rnd file formats, from the root.

### ha:pcb-rnd-board-v*

type:name | value | ver | description
--- | --- | --- | ---
ha:pcb-rnd-board-v* |  |  | The full, self-contained description of a printed circuit board. This is the root of a board .lht file. The * after the v in the name is an integer which is the format version.
ha:meta |  |  | Any meta-data that won't directly turn into physical material (e.g. copper).
board_name | string |  | User assigned name of the board
ha:grid |  |  | User interface last grid settings
offs_x | coord |  | grid origin: X offset from 0;0
offs_y | coord |  | grid origin: Y offset from 0;0
spacing | coord |  | distance between two grid points both in X and Y directions
ha:size |  |  | object size related settings
x | coord |  | drawing area size X (width)
y | coord |  | drawing area size Y (height)
isle_area_nm2 | double |  | remove polygon islands smaller than this value, specified in mm2
thermal_scale | double |  | scale all thermals on the board by this factor
ha:drc |  | <5 | design rule checker settings for the old DRC
bloat | coord |  | Minimum copper spacing
shrink | coord |  | Minimum overlap between validly touching copper objects
min_width | coord |  | Minimum copper width
min_silk | coord |  | Minimum silk width
min_drill | coord |  | Minimum drill diameter
min_ring | coord |  | Minimum annular ring width
ha:cursor |  |  | obsolete cursor/view state
x | coord |  | last positin, X (horizontal)
y | coord |  | last positin, Y (horizontal)
zoom | double |  | last view zoom factor
ha:layer_stack |  |  | physical layer stack information: geometry and properties of physical layers
li:groups |  |  | ordered list of physical layers from top to bottom
ha:INTEGER |  |  | a layer group (a physical layer of the board); the ID of the layer group is the integer in the name of the node
name | string |  | user assigned name of the layer group, e.g. "top copper"
ha:type |  |  | a flag-list of layer type flag bits
top | flag |  | location: top side
bottom | flag |  | location: bottom side
intern | flag |  | location: internal
logical | flag |  | location: logical (not in the actual stackup)
copper | flag |  | material: copper
silk | flag |  | material: silk
mask | flag |  | material: mask
paste | flag |  | material: paste
outline | flag |  | "material": router path (board outline, slots, cutouts)
substrate | flag |  | material: substrate or insulator
li:layers |  |  | ordered list of logical layer IDs hosted by this layer group
ha:font |  |  | font kit: all fonts used on the board (if no font specified, default font will be used)
ha:FONT-ID |  |  | the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below ->
ha:styles |  |  | routing styles hash: collection of all available routing syles
ha:netlists |  |  | all availale netlists
li:netlist |  |  | the input netlist (as seen in the last netlist import, a.k.a. forward annotation)
ha:NETNAME |  |  | a network
li:conn |  |  | list of terminals connceted to the network
diameter | string |  | refdes-terminal
ha:attributes |  | >=5 | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
li:netlist_patch |  |  | a list of intentional deviations from the input netlist, a.k.a. material for back annotation
li:net_info |  |  | describe the current state of a net, as seen on the input
net | string |  | net name; first item on the list, only once
term | string |  | terminal name; zero or more items starting from the second item
ha:add_conn |  |  | the 'as built' network requires a new conncetion to be created during the back annotation
net | string |  | net name the terminal should be added to
term | string |  | terminal name
ha:del_conn |  |  | the 'as built' network requires an existing conncetion to be removed during the back annotation
net | string |  | net name the terminal should be removed from
term | string |  | terminal name
ha:change_attrib |  |  | the 'as built' network requires an attribute to be set or changed
net | string |  | net name whose attribute needs to be changed
key | string |  | key (name) of the attribute
val | string |  | new value of the attribute
li:conf |  |  | complete pcb-rnd configuration tree ->
ha:data |  |  | Layers and global objects of the board ->
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value

### li:pcb-rnd-conf-v1

type:name | value | ver | description
--- | --- | --- | ---
li:pcb-rnd-conf-v1 |  |  | complete pcb-rnd configuration tree
ha:overwrite |  |  | overwrite values while merging; children: a full or partial config tree
ha:prepend |  |  | prepend values while merging; children: a full or partial config tree
ha:append |  |  | append values while merging; children: a full or partial config tree

### li:pcb-rnd-font-v1

type:name | value | ver | description
--- | --- | --- | ---
li:pcb-rnd-font-v1 |  |  | font description
ha:FONT-ID |  |  | the full description of a font; the node name is the integer font id or "geda_pcb" for font 0 (for historical reasons); the name is used only to make each node unique, the ID is also a field below
cell_height | coord |  | height of the tallest glyph
cell_width | coord |  | width of the widest glyph
id | integer |  | unique font ID within the fontkit; fonts are referenced by ID
name | string |  | user specified, user readable font name
ha:symbols |  |  | a collections of glyphs availbale in the font
ha:CHARACTER |  |  | Description of a glyph (symbol). Node name is a signel ASCII character or is of format &xx where xx is a hex digit of the ASCII code of the character. Characters that must use the hex version are: codes below 33 or over 126, &, #, {, }, /, :, ;, =, \, :
height | coord |  | height of the glyph
width | coord |  | width of the glyph
delta | coord |  | extra space always inserted after the current symbol, before the next character
li:objects |  |  | objects that make up the symbol; IDs are per symbol local IDs counted from 0
ha:line.ID |  |  | round cap line, simplified
x1 | coord |  | line first endpoint, horizontal offset
y1 | coord |  | line first endpoint, vertical offset
x2 | coord |  | line second endpoint, horizontal offset
y2 | coord |  | line second endpoint, vertical offset
thickness | coord |  | width of the line
ha:simplearc.ID |  |  | round cap arc, simplified
x | coord |  | center, X coord
y | coord |  | center, Y coord
r | coord |  | radius (of the centerline of the arc)
thickness | coord |  | width of the pen the arc is drawn with
astart | angle |  | start angle
adelta | angle |  | delta angle
li:simplepoly.ID |  |  | round cap arc, simplified; contains a flat list of coords; each coord pair is an x;y corner of the outline of the polygon (odd indices are x coords, even indices are y coords)

### ha:menu

type:name | value | ver | description
--- | --- | --- | ---
ha: |  |  | Menu file
li:mouse |  |  | mouse bindings
li:left |  |  | actions to execute on left button click
li:press |  |  | actions to execute on mouse button press when no modifier is pressed
li:press-shift |  |  | actions to execute on mouse button press when shift is pressed
li:press-ctrl |  |  | actions to execute on mouse button press when control is pressed
li:release |  |  | actions to execute on mouse button release when no modifier is pressed
li:release-shift |  |  | actions to execute on mouse button release when shift is pressed
li:release-ctrl |  |  | actions to execute on mouse button release when control is pressed
li:middle |  |  | actions to execute on middle button click
li:press |  |  | actions to execute on mouse button press when no modifier is pressed
li:press-shift |  |  | actions to execute on mouse button press when shift is pressed
li:press-ctrl |  |  | actions to execute on mouse button press when control is pressed
li:release |  |  | actions to execute on mouse button release when no modifier is pressed
li:release-shift |  |  | actions to execute on mouse button release when shift is pressed
li:release-ctrl |  |  | actions to execute on mouse button release when control is pressed
li:right |  |  | actions to execute on right button click
li:press |  |  | actions to execute on mouse button press when no modifier is pressed
li:press-shift |  |  | actions to execute on mouse button press when shift is pressed
li:press-ctrl |  |  | actions to execute on mouse button press when control is pressed
li:release |  |  | actions to execute on mouse button release when no modifier is pressed
li:release-shift |  |  | actions to execute on mouse button release when shift is pressed
li:release-ctrl |  |  | actions to execute on mouse button release when control is pressed
li:scroll-up |  |  | actions to execute on scroll wheel scolling up event
li:press |  |  | actions to execute on mouse button press when no modifier is pressed
li:press-shift |  |  | actions to execute on mouse button press when shift is pressed
li:press-ctrl |  |  | actions to execute on mouse button press when control is pressed
li:scroll-down |  |  | actions to execute on scroll wheel scolling down event
li:press |  |  | actions to execute on mouse button press when no modifier is pressed
li:press-shift |  |  | actions to execute on mouse button press when shift is pressed
li:press-ctrl |  |  | actions to execute on mouse button press when control is pressed
li:main_menu |  |  | root of the main pull-down menu system; ordered list of main menus
ha:MENUNAME |  |  | main menu name, e.g. "File"
m | string |  | mnemonic: single character that should be underlined and used as a hot key in the menu name
li:submenu |  |  | ordered list of menu items for a submenu ->
li:popups |  |  | collection of popup menus
ha:POPUPNAME |  |  | popup menu name, e.g. "layer" for layer context menu
m | string |  | mnemonic: single character that should be underlined and used as a hot key in the menu name
li:submenu |  |  | ordered list of menu items for a submenu ->

### ha:geda-project-v1

type:name | value | ver | description
--- | --- | --- | ---
ha:geda-project-v1 |  |  | Project file root. Except for "common", each software package should create a single subtree under the root; the subtree shall be named after the software package
ha:common |  |  | project settings that should be common to all software packages
name | string |  | long name of the project
desc | string |  | description of the project
url | string |  | homepage of the project
vcs | string |  | main vcs url for the project
contact | string |  | author/maintainer contact info
li:files |  |  | ordered list of source files being used by the project
ha:NAME |  |  | a project member file
path | string |  | path to the file, relative to the project file
desc | string |  | description of the file
type | string |  | optional: type of the file; one of: "pcb", "schematic", "doc"
li:libs |  |  | ordered list of libraries the project depends on
ha:NAME |  |  | a library
path | string |  | path to the library, relative to the project file; all files and subdirectories under the root, recursively, are considered part of the library (must not be used together with url)
url | string |  | url to the library (must not be used together with path)
desc | string |  | description of the library
type | string |  | optional: type of the library; one of: "footprint" (for pcb design), "symbol" (for schematic), "sim" (models and subcircuits for e.g. spice simulation)
li:pcb-rnd-conf-v1 |  |  | complete pcb-rnd configuration tree ->

### li:pcb-rnd-subcircuit-v*

type:name | value | ver | description
--- | --- | --- | ---
li:pcb-rnd-subcircuit-v* |  |  | footprint file containing a single subcircuit
ha:subc.ID |  | >=3 | an instance (full copy) of a subcircuit
uid | minuid |  | UID assigned by the user to track subc history
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags |  |  | flag bits of a subcircuit
found | flag |  | If set, this object has been found by FindConnection()
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
ha:data |  |  | Layers and global objects of the board ->

## Common subtrees

Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees.

### ha:data

type:name | value | ver | description
--- | --- | --- | ---
ha:data |  |  | Layers and global objects of the board
li:objects |  |  | List of global (non-layer/multi-layer) objects
ha:padstack_ref.ID |  | >=4 | a padstack reference (instance) placed on the board (e.g. used as a via)
proto | integer |  | padstack prototype ID to use, from the parent data's proto list
x | coord |  | place padstack with origin at this horizontal coordinate
y | coord |  | place padstack with origin at this vertical coordinate
clearance | coord |  | global clearance; if non-zero, overrides local (per shape) clearance
rot | angle |  | rotation angle in degrees
xmirror | integer |  | 0 or 1; if 1, mirror all shapes over the x (horizontal) axis (so that y coords are flipped)
smirror | integer |  | 0 or 1; if 1, mirror the layer stackup: bottom becomes top, top becomes bottom (a.k.a. "place on the other side")
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags |  |  | flag bits of a padstack
found | flag |  | If set, this object has been found by FindConnection()
hole | flag |  | For pins and vias, this flag means that the pin or via is a hole without a copper annulus.
clearline | flag |  | For lines and arcs, the line/arc will clear polygons instead of connecting to them.
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
warn | flag |  | For pins, vias, and pads, set to indicate a warning.
usetherm | flag |  | Obsolete, indicates that pins/vias should be drawn with thermal fingers.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
li:thermal |  |  | list of thermal shapes, per layer
li:LAYERID |  |  | integer layer ID the thermal affects; each word is a boolean flag that is either present on the list or is missing; only one shape may be present
on | none |  | thermal is present on this layer; if not present, all other thermal flags are ignored on this layer
diag | none |  | thermal graphics is not axis aligned but diagonal (rotated by 45 degrees)
round | none |  | shape: rounded edge fingers
sharp | none |  | shape: sharp edge fingers
solid | none |  | shape: no thermal relief, solid connection without clearance
noshape | none |  | shape: special: omit copper shape of the padstack on this layer
ha:via.ID |  | <=4 | an old via object (loaded as padstack in the new model)
x | coord |  | place padstack with origin at this horizontal coordinate
y | coord |  | place padstack with origin at this vertical coordinate
thickness | coord |  | copper shape dimension (diameter)
clearance | coord |  | copper clearance around the copper shape
mask | coord |  | mask cutout shape dimension (diameter)
hole | coord |  | drill/hole diameter
name | string |  | optional name attribute
number | string |  | for a pin (or to-be-pin) this is the terminal ID
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags_pinvia |  |  | flag bits of a pin or via
found | flag |  | If set, this object has been found by FindConnection()
hole | flag |  | For pins and vias, this flag means that the pin or via is a hole without a copper annulus.
clearline | flag |  | For lines and arcs, the line/arc will clear polygons instead of connecting to them.
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
warn | flag |  | For pins, vias, and pads, set to indicate a warning.
usetherm | flag |  | Obsolete, indicates that pins/vias should be drawn with thermal fingers.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
pin | flag |  | object is a pin (in an element)
via | flag |  | object is a via
li:layers |  |  | ordered list of layers; v1 required the order to be top-bottom physically; v1 also required silk layers to be at the end (same resrtictions as in the old .pcb format; only real (non-bound) layers have attributes)
ha:NAME |  |  | a logical layer
lid | integer | >=2 | layer ID
visible | integer |  | only in real (non-boud) layers: 1 if the layer is visible, 0 if not (UI setting)
group | integer |  | only in real (non-boud) layers: "parent" layer group ID
color | string | >=5 | layer color on UI, in #rrggbb format
stack_offs | integer |  | only in bound layers: match offset e.g. for internal copper layers
ha:type |  |  | only for bound layers: try to bind to this type of layer on the host board
top | flag |  | location: top side
bottom | flag |  | location: bottom side
intern | flag |  | location: internal
logical | flag |  | location: logical (not in the actual stackup)
copper | flag |  | material: copper
silk | flag |  | material: silk
mask | flag |  | material: mask
paste | flag |  | material: paste
outline | flag |  | "material": router path (board outline, slots, cutouts)
substrate | flag |  | material: substrate or insulator
combining |  | >=2 | layer combination (compositing) flags
sub | flag |  | draw in negative
auto | flag |  | padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
li:objects |  |  | list of drawing primitives put on this layer
ha:line.ID |  |  | round cap line
x1 | coord |  | line first endpoint, horizontal offset
y1 | coord |  | line first endpoint, vertical offset
x2 | coord |  | line second endpoint, horizontal offset
y2 | coord |  | line second endpoint, vertical offset
thickness | coord |  | width of the line
clearance | coord |  | copper clearance around the object
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags |  |  | flag bits of a line
found | flag |  | If set, this object has been found by FindConnection()
clearline | flag |  | For lines and arcs, the line/arc will clear polygons instead of connecting to them.
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
rubberend | flag |  | For lines, used internally for rubber band moves: indicates one end already rubber banding.
usetherm | flag |  | Obsolete, indicates that pins/vias should be drawn with thermal fingers.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
li:thermal |  |  | list of thermal flags for heavy terminals, on the single layer the object is on
on | none |  | draw any thermal only if this string is present; else normal clearance is applied
diag | none |  | if present, the thermal is diagonal (45 degree rotated)
round | none |  | if present, thermal shape is rounded
sharp | none |  | if present, thermal shape is sharp
solid | none |  | if present, there is no thermal but a solid connection ("join")
ha:arc.ID |  |  | round cap elliptic arc (only width==height is fully supported at the moment)
x | coord |  | center, X coord
y | coord |  | center, Y coord
width | coord |  | radius (of the centerline of the arc) in X direction
height | coord |  | radius (of the centerline of the arc) in Y direction
thickness | coord |  | width of the pen the arc is drawn with
clearance | coord |  | copper clearance around the object
astart | angle |  | start angle
adelta | angle |  | delta angle
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags |  |  | flag bits of a arc
found | flag |  | If set, this object has been found by FindConnection()
clearline | flag |  | For lines and arcs, the line/arc will clear polygons instead of connecting to them.
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
rubberend | flag |  | For lines, used internally for rubber band moves: indicates one end already rubber banding.
usetherm | flag |  | Obsolete, indicates that pins/vias should be drawn with thermal fingers.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
li:thermal |  |  | list of thermal flags for heavy terminals, on the single layer the object is on
on | none |  | draw any thermal only if this string is present; else normal clearance is applied
diag | none |  | if present, the thermal is diagonal (45 degree rotated)
round | none |  | if present, thermal shape is rounded
sharp | none |  | if present, thermal shape is sharp
solid | none |  | if present, there is no thermal but a solid connection ("join")
ha:polygon.ID |  |  | polygon, as drawn (unclipped)
clearance | coord | >=3 | copper clearance around the object
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags |  |  | flag bits of a polygon
found | flag |  | If set, this object has been found by FindConnection()
clearpoly | flag |  | For polygons, this flag means that pins and vias will normally clear these polygons (thus, thermals are required for electrical connection). When clear, polygons will solidly connect to pins and vias.
fullpoly | flag |  | For polygons, the full polygon is drawn (i.e. all parts instead of only the biggest one).
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
clearpolypoly | flag |  | For polygons, apply clearance to nearby polygons
floater | flag |  | subc part can be moved after subc placing
li:thermal |  |  | list of thermal flags for heavy terminals, on the single layer the object is on
on | none |  | draw any thermal only if this string is present; else normal clearance is applied
diag | none |  | if present, the thermal is diagonal (45 degree rotated)
round | none |  | if present, thermal shape is rounded
sharp | none |  | if present, thermal shape is sharp
solid | none |  | if present, there is no thermal but a solid connection ("join")
li:geometry |  |  | first item is the outer contour, subsequent, optional items are holes
contour | coordtbl |  | 2 column table of x;y coords for the outer contour
hole | coordtbl |  | 2 column table of x;y coords for a hole
ha:text.ID |  |  | single line text object
x | coord |  | placement: X coord
y | coord |  | placement: Y coord
role | string |  | when part of an old element, determines which of the three hardwired text object role is used (footprint, refdes or value)
string | string |  | text string (payload)
fid | integer |  | font ID
scale | integer |  | text size scale in %
direction | integer |  | rotation in 90 degree steps (0 is horizontal)
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags |  |  | flag bits of a text
found | flag |  | If set, this object has been found by FindConnection()
clearline | flag |  | For lines and arcs, the line/arc will clear polygons instead of connecting to them.
selected | flag |  | Set when the object is selected.
onsolder | flag |  | For text, indicates that it is on the solder side.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
dyntext | flag |  | For text: dynamic string (substitute %patterns%)
floater | flag |  | subc part can be moved after subc placing
li:padstack_prototypes |  | >=4 |
unused | none |  | placeholder for markign uunsed slot to keep slot indices for early lihata v4
ha:ps_proto_v4.PID |  |  | padstack prototype specification, as introduced in lihata board v4
hdia | coord |  | hole diameter; 0 means no hole
htop | integer |  | hole start: copper layer index from the top (positive) or bottom (negative) copper layer (0 means top copper layer)
hbottom | integer |  | hole start: copper layer index from the bottom (positive) or top (negative) copper layer (0 means bottom copper layer)
plated | integer |  | 0=unplated hole; 1=plated hole
name | string | >=5 | optional user assigned prototype name
li:shape |  |  | shape per layer type definition
ha:ps_shape_v4 |  |  | shape on a specific layer type (specified by layer_mask and combining), as specifie in lihata board v4; shape is either ps_poly, ps_line or ps_circ (only one of these will present per layer type); shape coords are relative to padstack origin
ha:layer_mask |  |  | layer type and location
top | flag |  | location: top side
bottom | flag |  | location: bottom side
intern | flag |  | location: internal
logical | flag |  | location: logical (not in the actual stackup)
copper | flag |  | material: copper
silk | flag |  | material: silk
mask | flag |  | material: mask
paste | flag |  | material: paste
outline | flag |  | "material": router path (board outline, slots, cutouts)
substrate | flag |  | material: substrate or insulator
combining |  |  | layer compositing match
sub | flag |  | draw in negative
auto | flag |  | padstacks draw their paste, mask and silk objects on the first layer (of matching type) that features the auto flag
clearance | coord |  | local, per-layer-type clearance; applied if global padstack clearance is 0
li:ps_poly |  |  | arbitrary convex polygon shape; contains a list of x;y coordinates
ha:ps_line |  |  | straight line shape, round or square cap
x1 | coord |  | line first endpoint, horizontal offset
y1 | coord |  | line first endpoint, vertical offset
x2 | coord |  | line second endpoint, horizontal offset
y2 | coord |  | line second endpoint, vertical offset
thickness | coord |  | width of the line
square | integer |  | 0=round cap; 1=square cap
ha:ps_circ |  |  | filled circle shape
x | coord |  | center, horizontal offset
y | coord |  | center, vertical offset
dia | coord |  | circle diameter
ha:subc.ID |  | >=3 | an instance (full copy) of a subcircuit
uid | minuid |  | UID assigned by the user to track subc history
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags |  |  | flag bits of a subcircuit
found | flag |  | If set, this object has been found by FindConnection()
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
ha:data |  |  | Layers and global objects of the board ->
ha:element.ID |  | <3 | an instance (full copy) of an obsolete element footprint
x | coord |  | element origin (diamond), horizontal offset
y | coord |  | element origin (diamond), vertical offset
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags_element |  |  | flag bits of an element
found | flag |  | If set, this object has been found by FindConnection()
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
onsolder | flag |  | element is placed on the solder side
li:objects |  |  | list of special objects that make up the element; lines and arcs are always on a silk layer
ha:line.ID |  |  | round cap line ->
ha:arc.ID |  |  | round cap elliptic arc (only width==height is fully supported at the moment) ->
ha:text.ID |  |  | single line text object ->
ha:pad.ID |  |  | SMD pad emulated using a line object; becomes a rectangle (but watch out for the cap-extended length!) when the square flag is set
x1 | coord |  | line first endpoint, horizontal offset
y1 | coord |  | line first endpoint, vertical offset
x2 | coord |  | line second endpoint, horizontal offset
y2 | coord |  | line second endpoint, vertical offset
thickness | coord |  | width of the line
clearance | coord |  | clearance around the line
mask | coord |  | size of the mask cutout, as interpreted by gEDA/PCB
name | string |  | symbolic name of the pad
number | string |  | "pin number" for the netlist
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags_pad |  |  | flag bits of a pad
found | flag |  | If set, this object has been found by FindConnection()
hole | flag |  | For pins and vias, this flag means that the pin or via is a hole without a copper annulus.
clearline | flag |  | For lines and arcs, the line/arc will clear polygons instead of connecting to them.
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
warn | flag |  | For pins, vias, and pads, set to indicate a warning.
usetherm | flag |  | Obsolete, indicates that pins/vias should be drawn with thermal fingers.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
pin | flag |  | object is a pin (in an element)
via | flag |  | object is a via
ha:pin.ID |  |  | thru-hole pin; emulated as an old-style via
x | coord |  | place padstack with origin at this horizontal coordinate
y | coord |  | place padstack with origin at this vertical coordinate
thickness | coord |  | copper shape dimension (diameter)
clearance | coord |  | copper clearance around the copper shape
mask | coord |  | mask cutout shape dimension (diameter)
hole | coord |  | drill/hole diameter
name | string |  | optional name attribute
number | string |  | for a pin (or to-be-pin) this is the terminal ID
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags_pinvia |  |  | flag bits of a pin or via
found | flag |  | If set, this object has been found by FindConnection()
hole | flag |  | For pins and vias, this flag means that the pin or via is a hole without a copper annulus.
clearline | flag |  | For lines and arcs, the line/arc will clear polygons instead of connecting to them.
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
warn | flag |  | For pins, vias, and pads, set to indicate a warning.
usetherm | flag |  | Obsolete, indicates that pins/vias should be drawn with thermal fingers.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing
pin | flag |  | object is a pin (in an element)
via | flag |  | object is a via
ha:rat.ID |  |  | global rat line
x1 | coord |  | line first endpoint, horizontal offset
y1 | coord |  | line first endpoint, vertical offset
x2 | coord |  | line second endpoint, horizontal offset
y2 | coord |  | line second endpoint, vertical offset
lgrp1 | integer |  | first endpoint's layer group ID
lgrp2 | integer |  | second endpoint's layer group ID
ha:attributes |  |  | a hash of attribute key=value pairs
attrib-key | string |  | attribute value
ha:flags |  |  | flag bits of a line
found | flag |  | If set, this object has been found by FindConnection()
clearline | flag |  | For lines and arcs, the line/arc will clear polygons instead of connecting to them.
selected | flag |  | Set when the object is selected.
auto | flag |  | For lines and vias, indicates that these were created by the autorouter.
rubberend | flag |  | For lines, used internally for rubber band moves: indicates one end already rubber banding.
usetherm | flag |  | Obsolete, indicates that pins/vias should be drawn with thermal fingers.
drc | flag |  | Set for objects that fail DRC: flag like FOUND flag for DRC checking.
lock | flag |  | Set for locked objects.
nonetlist | flag |  | subcircuit is not on the netlist and should not interfere with the netlist
termname | flag |  | when set the names of pins are shown.
floater | flag |  | subc part can be moved after subc placing

### li:submenu

type:name | value | ver | description
--- | --- | --- | ---
li:submenu |  |  | ordered list of menu items for a submenu
m | string |  | mnemonic: single character that should be underlined and used as a hot key in the menu name
- | none |  | horizontal separator
@ANCHOR | none |  | an anchor is an invisible placeholder where a dynamically generated set of menu items should be inserted runtime
ha:SUBSUBMENUNAME |  |  | sub-submenu item: opens a new level of submenu when clicked
m | string |  | mnemonic: single character that should be underlined and used as a hot key in the menu name
li:submenu |  |  | ordered list of menu items for a submenu ->
ha:LEAFSUBMENUNAME |  |  | leaf submenu item: executes an action when clicked
m | string |  | mnemonic: single character that should be underlined and used as a hot key in the menu name
li:a |  |  | list of alternative hotkey sequences to activate the menu
a | string |  | a single hotkey sequences to activate the menu
li:action |  |  | list of actions to execute when the menu is activated
action | string |  | a single action to execute when the menu is activated
tip | string |  | tooltip text
checked | string |  | the menu item has a checkbox; value is the action to execute to determine whether the menu item's checkbox is checked or not
update_on | string |  | path of a conf node that triggers re-evaluation of the checkbox state

## Types

type | description
--- | ---
angle | A decimal number without unit, representing an angle in degree. Can be positive or negative.

coord

A decimal number with a unit suffix. If the unit suffix is missing, the coordinate is loaded in the internal units (which is nanometer as of 2018, but could change in the future, thus files shall not depend on it). Depending on the context, coordinates may have a sign (positive or negative).

Examples:

    x=10mil;
    y=1.5mm;
    dia=12cm;

coordtbl

A two-column table of coords. First column are X, second column are Y coordinates.

Examples:

    ta:contour {
     1mm;   2.1mm;
     5mm;   5.2mm;
     3.7mm; 12mil;
    }
    ta:foo = { 1mm; 2.1mm;  5mm;   5.2mm;  3.7mm; 12mil; }

double | Unitless numeric value in decimal format. Depending on context it is sometimes signed.
flag | If the flag is set, the value is "1", if the flag is not set, the whole key=value pair is omitted.
integer | Unitless integer value in decimal format. Depending on context it is sometimes signed.
minuid | An unique ID as generated by libminuid (24 ASCII characters).
none | No value.
string | Free form text data