Add [footprint manager]

Use: Add a footprint

Command: Tools > Edit Configured Libraries > Footprints > Add Footprint

Syntax: Add Array("NAME:<FootprintName>,

"ModTime:=", <ModifiedOnInfo>,

"Library:=", "",

"LibLocation:=", "Project",

"OkayToMirror:=", <bool>,

"DefUnits:=", <UnitType>,

Array(NAME:Lyrs",

"Layer:=", <LayerArray>,

"Layer:=", <LayerArray>…,

"SLayer:=", <StackupLayerArray>,

"SLayer:=", <StackupLayerArray>...),

"ActLyr:=", <string>, // name of active layer

"Tol:=", <ToleranceArray> // optional

<PrimitivesInfo>, // optional

<PinsInfo>, // optional

<ViasInfo>, // optional

<EdgeportsInfo>, // optional

<ComponentPropertyInfo>,

<ScriptInfo>) // optional, specified for scripted footprints

 

Return Value: <string>

// composite name of the footprint.

// If the name requested conflicts with the name of an existing

// footprint, the requested name is altered to be unique.

// The name returned reflects any change made to be unique.

 

Parameters: <FootprintName>:

<string> // simple name of footprint to create

<ModifiedOnInfo>:

An integer that corresponds to the number of seconds that have elapsed

since 00:00 hours, Jan 1, 1970 UTC from the system clock.

 

<UnitType>:

<string> // default length units to use if units are not specified in other

// parameters

 

<LayerArray>:

Array("N:=", <string>, // layer name

"ID:=", <int> ,

"T:=", <LayerTypeInfo>, // layer type

"TB:=", <TopBottomInfo>,

"Col:=", <int>, // optional - color

"Pat:=", <int>, // optional - fill pattern

"Vis:=", <bool>, // optional - are objects on layer visible

"Sel:=", <bool>, // optional - are objects on layer selectable

"L:=", <bool>) // optional

// are objects on layer locked (can't be edited)

 

<LayerTypeInfo>:

<string> // one of: signal, dielectric, metalized signal, assembly, silkscreen, soldermask, solderpaste, glue, or user

 

<TopBottomInfo>:

<string> // one of: top, neither, bottom, or template

 

<StackupLayerArray>:

Array(<LayerArray>,

"Elev:=", <ElevationInfo>,

"SubL:=", Array("Th:=", <Dimension>,

"LElev:=", <Dimension>,

"R:=", <Dimension>,

"M:=", <MaterialInfo>))

<ElevationInfo>:

<string> // "top" - snap to top

// "mid" - snap to middle

// "bot" - snap to bottom

// "edit" - manual edit

// "none"

 

<Dimension>:

<string> // real number, may include units

 

<MaterialInfo>:

<string> // name of the layer material

 

<ToleranceArray>:

Array(<real>, // distance tolerance

<real>, // angle tolerance (radians)

<real>) // dimensionless tolerance

 

<PrimitivesInfo>:

Array("NAME:Prims",

// one or more of the following

<RectInfo>,

<CircleInfo>,

<ArcInfo>,

<LineInfo>,

<PolygonInfo>,

<TextInfo>,

<ImageInfo>)

 

<RectInfo>:

"Rect:=", Array(<real>, // line width

<int>, // fill pattern

<int>, // color

<real>, // angle, in radians

<real>, // x position of center

<real>, // y position of center

<real>, // width

< real>) // height

 

<CircleInfo>:

"Circle:=", Array(<real>, // line width

<int>, // fill pattern

<int>, // color

<real>, // x position of center

<real>, // y position of center

< real>) // radius

 

<ArcInfo>:

"Arc:=", Array(<real>, // line width

<int>, // line pattern

<int>, // color

<real>, // x position of center

<real>, // y position of center

< real>, // radius

<real>, // start angle, in radians

<end>) // end angle, in radians

 

<LineInfo>:

"Line:=", Array(<real>, // line width

<int>, // line pattern

<int>, // color

<PointInfo>, // must specify at least 2 points

<PointInfo>...)

<PointInfo>:

<real>, // x position

<real> // y position

 

<PolygonInfo>:

"Polygon:=", Array(<real>, // line width

<int>, // fill pattern

<int>, // color

<PointInfo>, // must specify at least 3 points

<PointInfo>...)

 

<TextInfo>:

"Text:=", Array(<real>, // x position

<real>, // y position

<real>, // angle, in radians

<Justification>,

<bool>, // is plotter font

<string>, // font name

<int>, // color

<string>) // text string

<Justification>: <int>

// 0 : left top

// 1 : left base

// 2 : left bottom

// 3 : center top

// 4 : center base

// 5 : center bottom

// 6 : right top

// 7 : right base

// 8 : right bottom

 

<ImageInfo>:

"Image:=", Array(<RectInfo>,

<ImageData>,

<bool>) // is mirrored

 

<ImageData>:

<string>, // file path

<int>, // 0 : use the file path and link to it

// 1 : ignore file path and use next parameter

<string> // text data, only present if preceding int is 1

 

<PinsInfo>:

Array("NAME:Pins",

"P:=", <PinArray>,

"P:=", <PinArray>,...)

 

<PinArray>:

Array("Port:=", Array("Id:=", <int>,

"Clr:=", <real>, // optional - clearance

"N:=", <string>), // pin name

"Pos:=", Array("x:=", <Location>, // padstack (x,y) position

"y:=", <Location>),

"VRt:=", <Angle>, // optional - rotation

"HD:=", <Size>, // optional - hole diameter

<PadstackImplementationInfo>)

 

<Location>:

<string> specifying real number and units (may use variables)

 

<Angle>:

<string> specifying angle with a real number and units

 

<Size>:

<string> specifying size with a real number and units

 

<PadstackImplementationInfo>:

If another with the same implementation has already been specified:

"Ref:=", <int> // id of the other

If not:

"Ref:=", <string>, // name

"Frm:=", <int>, // id of highest layer

"To:=", <int>, // id of lowest layer

<LayerPlacementInfo>,

"Man:=", <int>, // optional, 1 if manually placed, 0 if not (default)

"Use:=", Array(<PadUseInfo>, <PadUseInfo>…) // array may be empty

 

<LayerPlacementInfo>:

"Lyr:=", Array("Mrg:=", <int>, // optional,

// 1 if all layers have been merged (default)

// 0 if layer are not merged

"Flp:=", <int>, // optional,

// 1 if placed bottom up

// 0 if not (default)

"Map:=", <ParentToLocalLayerInfo>)

 

<ParentToLocalLayerInfo>:

Array("U:=", <DirectionOfUniqueness>,

"F:=", Array(<int>, <int>, …), // forward mapping

// -1 is not mapped

"B:=", Array(<int>, <int>, …)) // backward mapping

// -1 is not mapped

 

<PadUseInfo>:

"Pad:=", Array("Lid:=", <int>, // layer id

"T:=", <string>, // type : "connected", "thermal",

// "no_pad, "not_connected",

// or "not_connected_thermal"

"Man:=", <int>) // optional, 1 if manually placed

// 0 if not (default)

 

<DirectionOfUniqueness>:

<string> // one of "forward", "backward", or "two ways"

 

<ViasInfo>:

Array("NAME:Vias", <ViaInfo>, <ViaInfo>…)

 

<ViaInfo>:

"V:=", Array("Id:=", <int>,

"N:=", <string>, // name

"Pos:=", Array("x:=", <Location>, // via (x,y) position

"y:=", <Location>),

"VRt:=", <Angle>, // optional - rotation

<ImplementationInfo>

 

<EdgeportsInfo>:

Array("NAME:EPorts", <EdgePortArray>, <EdgePortArray>…)

 

<EdgePortArray>:

Array("NAME:EP",

"LP:=", Array("Id:=", <int>, // port id

"N:=", <string>), // port name

"Eo:=", Array(<edge description>, <edge description>,...))

 

<edge description> for primitive edges

 

"et:=", "pe", "pr:=", <id>, "ei:=", <edge#>

 

<id>: integer that is the primitive id

 

<edge#>: integer that is the edge number on the primitive

 

<edge description> for via edges

 

"et:=", "pse", "layer:=", <layer id>, "se:=", <via id>,

"sx:=", <start X location>, "sy:=", <start Y location>, "ex:=", <end X location>,

"ey:=", <end Y location>, "h:=", <arc height>, "rad:=", <radians>

 

<via id>: an integer that is the id of the via to use

<layer id>: an integer that is the id of the layer of the pad of the via to use

<start X location>

 

<start Y Location>:

   doubles that are the X, Y location of the start point of the edge arc <end X location>

<end Y Location>:

   doubles that are the X, Y location of the end point of the edge arc

 

<arc height>: double giving the height of the edge arc (0 for a straight edge)

<radians>: double giving the arc size in radians (0 for a straight edge)

 

<ComponentPropertyInfo>:

Array("NAME:CProps",

"VariableProp:=", <VariableInfo>,

"VariableProp:=", <VariableInfo>,

…)

 

<VariableInfo>:

Array(<string>, // name

<FlagLetters>,

<string>, // description

"CB:=", <string>, // optional - script for call back

<string>) // value: number, variable, or expression

 

<ScriptInfo>:

Array("NAME:script",

"language:=", <string>, // one of "javascript" or "vbscript"

"UsesScript:=", true,

"script:=", <string>) // contents of script

 

VB Example:

oFootprintManager.Add (Array("NAME:BCL", _

"ModTime:=", 1023388445, _

"Library:=", "", _

"LibLocation:=", "Project", _

"OkayToMirror:=", false, _

"DefUnits:=", "mm", _

Array("NAME:Lyrs", _

"Layer:=", Array("N:=", "Measures", _

"ID:=", 8, _

"T:=", "measures", _

"Col:=", 4144959, _

"Pat:=", 1), _

"Layer:=", Array("N:=", "Rats", _

"ID:=", 1, _

"T:=", "rat", _

"Col:=", 16711680, _

"Pat:=", 1), _

"Layer:=", Array("N:=", "Errors", _

"ID:=", 2, _

"T:=", "error", _

"Col:=", 255, _

"Pat:=", 1, _

"L:=", true), _

"Layer:=", Array("N:=", "Symbols", _

"ID:=", 3, _

"T:=", "symbol", _

"Col:=", 8323199, _

"Pat:=", 4), _

"Layer:=", Array("N:=", "Assembly", _

"ID:=", 4, _

"T:=", "assembly", _

"TB:=", "top", _

"Col:=", 16711680, _

Pat:=", 3), _

"Layer:=", Array("N:=", "Silkscreen", _

"ID:=", 5, _

"T:=", "silkscreen", _

TB:=", "top", _

"Col:=", 8454143, _

"Pat:=", 6), _

SLayer:=", Array("Layer:=", Array("N:=", "Cover", _

"ID:=", 12, _

"T:=", "metalizedsignal", _

"Col:=", 32639, _

Pat:=", 7), _

"Elev:=", "mid", _

"SubL:=", Array("Th:=", "0mm", _

"LElev:=", "118.110236220472mil", _

"R:=", "0mm", _

"Mat:=", "")), _

"SLayer:=", Array("Layer:=", Array("N:=", "Dielec3", _

"ID:=", 11, _

"T:=", "dielectric", _

"Col:=", 8323199, _

"Pat:=", 6), _

"Elev:=", "none", _

"SubL:=", Array("Th:=", "1mm", _

"LElev:=", "78.740157480315mil", _

"R:=", "0mm", _

"Mat:=", "")), _

"SLayer:=", Array("Layer:=", Array("N:=", "Trace2", _

"ID:=", 10, _

"T:=", "signal", _

"Col:=", 8355584, _

"Pat:=", 5), _

"Elev:=", "mid", _

"SubL:=", Array("Th:=", "0mm", _

"LElev:=", "78.740157480315mil", _

"R:=", "0mm", _

"Mat:=", "")), _

"SLayer:=", Array("Layer:=", Array("N:=", "Dielec2", _

"ID:=", 6, _

"T:=", "dielectric", _

"Col:=", 8323072, _

"Pat:=", 4), _

"Elev:=", "none", _

"SubL:=", Array("Th:=", "1mm", _

"LElev:=", "39.3700787401575mil", _

"R:=", "0mm", _

"Mat:=", "")), _

"SLayer:=", Array("Layer:=", Array("N:=", "Trace1", _

"ID:=", 0, _

"T:=", "signal", _

"Col:=", 32512, _

"Pat:=", 3), _

"Elev:=", "mid", _

"SubL:=", Array("Th:=", "0mm", _

"LElev:=", "39.3700787401575mil", _

"R:=", "0mm", _

"Mat:=", "")), _

"SLayer:=", Array("Layer:=", Array("N:=", "Dielec1", _

"ID:=", 7, _

"T:=", "dielectric", _

"Col:=", 127, _

"Pat:=", 7), _

"Elev:=", "none", _

"SubL:=", Array("Th:=", "1mm", _

"LElev:=", "0mil", _

"R:=", "0mil", _

"Mat:=", "")), _

"SLayer:=", Array("Layer:=", Array("N:=", "Ground", _

"ID:=", 9, _

"T:=", "metalizedsignal", _

"Col:=", 4144959, _

"Pat:=", 6), _

"Elev:=", "mid", _

"SubL:=", Array("Th:=", "0mil", _

"LElev:=", "0mil", _

"R:=", "0mil", _

"Mat:=", ""))), _

"ActLyr:=", "Trace2", _

Array("NAME:Prims",

"rect:=", Array("Id:=", 10003, _

"Lyr:=", 10, _

"N:=", "rect101", _

"x:=", "0mm", _

"y:=", "0mm", _

"w:=", "P", _

"h:=", "W", _

"Vds:=", Array()), _

"rect:=", Array("Id:=", 10103, _

"Lyr:=", 0, _

"N:=", "rect103", _

"x:=", "0mm", _

"y:=", "0mm", _

"w:=", "P", _

"h:=", "W", _

"Vds:=", Array())), _

Array("NAME:Pins",

"P:=", Array("Port:=", Array("Id:=", 3, "N:=", "n1"), _

"Pos:=", Array("x:=", "-P/2", "y:=", "0mm"), _

"VRt:=", "180deg", _

"Ref:=", "NoPad SMT East", _

"Frm:=", 12, _

"To:=", 9, _

"Lyr:=", Array("Map:=", Array("U:=", "forward",_

"F:=", Array(-1, -1, -1, -1,_

-1, -1, -1, -1,_

-1, -1, 0, -1, -1), _

"B:=", Array(10))), _

"Use:=", Array()), _

"P:=", Array("Port:=", Array("Id:=", 4, "N:=", "n4"),_

"Pos:=", Array("x:=","P/2", "y:=", "0mm"),_

"HD:=", "1mm", _

"Ref:=", 3), _

"P:=", Array("Port:=", Array("Id:=",5, "N:=", "n2"),_

"Pos:=", Array("x:=", "-P/2", "y:=", "0mm"),_

"VRt:=", "180deg",_

"Ref:=", "NoPad SMT East",_

"Frm:=", 12, _

"To:=", 9, _

"Lyr:=", Array("Map:=", Array("U:=", "forward",_

"F:=", Array(0, -1, -1, -1, -1,_

-1, -1, -1, -1, _

-1, -1, -1, -1), _

"B:=", Array(0))), _

"Use:=", Array()), _

"P:=", Array("Port:=", Array("Id:=", 6, "N:=", "n3"), _

"Pos:=", Array("x:=", "P/2", "y:=", "0mm"),_

"HD:=", "1mm", _

"Ref:=", 5)), _

Array("NAME:Nets"), _

Array("NAME:CProps",

"VariableProp:=", Array("W", _

"UD", _

"", _

"1.5mm"),_

"VariableProp:=", Array("P", _

"UD", _

"", _

10mm"))))