Element files are used to describe one component which then may be used
several times within one or more layouts. You will normally split the
file into two parts, one for the pinout and one for the package description.
Using m4
allows you to define pin names as macros in one file and
include a package description file which evaluates the macros. See
the resource elementCommand for more information. The pins (and pads)
must appear in sequential order in the element file (new in 1.5) so that
pin 1 must be the first PIN(...) in the file.
Doing things this way makes it possible to use one package file for several
different circuits. See the sample files dil*
.
The lowest x and y coordinates of all sub-objects of an element are used as an attachment point for the cross hair cursor of the main window.
File = {Element}... Element = "Element(" Flags Description LayoutName Value \ TextX TextY direction scale TextFlags")" "(" {ElementData}... [Mark] ")" ElementData = {ElementLine | Pad | Pin | ElementArc }... ElementArc = "ElementArc(" X Y Width Height StartAngle DeltaAngle Thickness ")" ElementLine = "ElementLine(" X1 Y1 X2 Y2 Thickness ")" Mark = "Mark(" X Y ")" Pad = "Pad(" X1 Y1 X2 Y2 Thickness Name PinNumber Flags ")" Pin = "Pin(" X Y Thickness DrillingHole Name PinNumber Flags ")"
Element
Flags
bit 4: the element name is hidden bit 6: element has been selected bit 7: element is located on the solder side
TextFlags
scale
direction
ElementLine
ElementArc
Mark
Pad
bit 2: set if pad was found during a connection search bit 5: display the pads name bit 6: pad has been selected bit 7: pad is located on the solder side
Pin
bit 0: always set bit 1: always clear bit 2: set if pin was found during a connection search bit 3: set if pin is only a mounting hole (no copper annulus) bit 5: display the pins name bit 6: pin has been selected bit 8: pin is drawn as a square bit 12: set if pin is drawn with an octagonal shape