Add [footprint manager]
The general Add command tocan be used to add a footprint.
| UI Access | Tools > Edit Libraries > Footprints > Add Footprint | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Parameters |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Return Value |
Returns a string of the 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. |
<LyrsArray>
<LayerArray>:
["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> – defined as a string with one of the following: "signal", "dielectric",
"metalized signal", "assembly", "silkscreen", "soldermask", "solderpaste", "glue",
or "user".
<TopBottomInfo> – defined as a string with one of the following: "top", "neither", "bottom",
or "template"
<StackupLayerArray>:
[<LayerArray>,
"Elev:=", <ElevationInfo>,
"SubL:=", ["Th:=", <Dimension>,# real number, may include units
"LElev:=", <Dimension>, # real number, may include units
"R:=", <Dimension>, # real number, may include units
"M:=", <MaterialInfo>, # name of layer material defined as a string]]
<ElevationInfo> – defined as a string with one of the following:
"top" - snap to top
"mid" - snap to middle
"bot" - snap to bottom
"edit" - manual edit
"none"
<PrimitivesInfo>
["NAME:Prims",
# one or more of the following
<RectInfo>,
<CircleInfo>,
<ArcInfo>,
<LineInfo>,
<PolygonInfo>,
<TextInfo>,
<ImageInfo>]
<RectInfo>:
"Rect:=", [<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:=", [<real>, # line width
<int>, # fill pattern
<int>, # color
<real>, # x position of center
<real>, # y position of center
<real>] # radius
<ArcInfo>:
"Arc:=", [<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:=", [<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:=", [<real>, # line width
<int>, # fill pattern
<int>, # color
<PointInfo>, # must specify at least 3 points
<PointInfo>...]
<TextInfo>:
"Text:=", [<real>, # x position
<real>, # y position
<real>, # angle, in radians
<Justification>,
<bool>, # is plotter font
<string>, # font name
<int>, # color
<string>] # text string
<Justification> – defined as an integer
# 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:=", [<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>:
["NAME:Pins",
"P:=", <PinArray>,
"P:=", <PinArray>,...]
<PinArray>:
["Port:=", ["Id:=", <int>,
"Clr:=", <real>, # optional - clearance
"N:=", <string>), # pin name
"Pos:=", ["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:=", [<PadUseInfo>, <PadUseInfo>…] # array may be empty
<LayerPlacementInfo>:
"Lyr:=", ["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>:
["U:=", <DirectionOfUniqueness>, # one of "forward", "backward", or "two ways"
"F:=", [<int>, <int>, …], # forward mapping; -1 is not mapped
"B:=", [<int>, <int>, …] # backward mapping; -1 is not mapped
]
<PadUseInfo>:
"Pad:=", ["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)
]
<ViasInfo>:
["NAME:Vias", <ViaInfo>, <ViaInfo>…]
<ViaInfo>:
"V:=", ["Id:=", <int>,
"N:=", <string>, # name
"Pos:=", ["x:=", <Location>, # via (x,y) position
"y:=", <Location>],
"VRt:=", <Angle>, # optional - rotation
<ImplementationInfo>]
<EdgeportsInfo>:
["NAME:EPorts", <EdgePortArray>, <EdgePortArray>…]
<EdgePortArray>
["NAME:EP",
"LP:=", ["Id:=", <int>, # port id
"N:=", <string>], # port name
"Eo:=", [<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", "sel:=", <"via">, "layer:=",
<layer id>,
"sx:=", <start X location>, "sy:=",
<start Y location>,
"ex:=", <end X location>, "ey:=", <end
Y location>,
"h:=", <arc height>, "rad:=", <radians>
<"via">: text that is the name 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>:
["NAME:CProps",
"VariableProp:=", <VariableInfo>,
"VariableProp:=", <VariableInfo>,
…]
<VariableInfo>:
[<string>, # name
<FlagLetters>,
<string>, # description
"CB:=", <string>, # optional - script for call back
<string>] # value: number, variable, or expression
<ScriptInfo>:
["NAME:script",
"language:=", <string>, # script language
"UsesScript:=", true,
"script:=", <string>] # contents of script
| Python Syntax | Add([<FootprintName>, <ModTime>,<Library>,<ModSinceLib>, <LibLocation>, <OkayToMirror>, <DependsOnSubstrateParams>,<DefUnits>, <NIdx>, <Lyrs>,<ActLyr>) |
| Python Example |
oProject = oDesktop.SetActiveProject("SSN_ECAD_3DL")
oDefinitionManager = oProject.GetDefinitionManager() oFootprintManager = oDefinitionManager.GetManager("Footprint") oFootprintManager.Add( [ "NAME:Footprint2", "ModTime:=" , 1746197177, "Library:=" , "", "ModSinceLib:=" , False, "LibLocation:=" , "Project", "OkayToMirror:=" , False, "DependsOnSubstrateParams:=", False, "DefUnits:=" , "mm", "NIdx:=" , 0, [ "NAME:Lyrs", "Mode:=" , "Laminate", [ "NAME:pps" ], "SLayer:=" , [ "Layer:=" , [ "N:=" , "Top", "ID:=" , 7, "T:=" , "signal", "Col:=" , 32512, "Tr:=" , 0, "Pat:=" , 1, "Vf:=" , 127, "Zones:=" , []], "SubL:=" , [ "Th:=" , "0mil", "LElev:=" , "62mil", "R:=" , "0um", "BR:=" , "0um", "SR:=" , "0um", "Mat:=" , "copper", "FilMat:=" , "FR4_epoxy"], "UseR:=" , False, "RMdl:=" , "Huray", "NR:=" , "0mil", "HRatio:=" , "2.9", "BRMdl:=" , "Huray", "BNR:=" , "0mil", "BHRatio:=" , "2.9", "SRMdl:=" , "Huray", "SNR:=" , "0mil", "SHRatio:=" , "2.9", "IsTSV:=" , False, "OxideThicknesses:=" , [], "OxideMaterials:=" , []], "SLayer:=" , [ "Layer:=" , [ "N:=" , "Dielectric", "ID:=" , 0, "T:=" , "dielectric", "Col:=" , 127, "Tr:=" , 0, "Pat:=" , 1, "Vf:=" , 127, "Zones:=" , []], "SubL:=" , [ "Th:=" , "62mil", "LElev:=" , "0mil", "R:=" , "0um", "BR:=" , "0um", "SR:=" , "0um", "Mat:=" , "FR4"], "UseR:=" , False, "RMdl:=" , "Huray", "NR:=" , "0mil", "HRatio:=" , "2.9", "BRMdl:=" , "Huray", "BNR:=" , "0mil", "BHRatio:=" , "2.9", "SRMdl:=" , "Huray", "SNR:=" , "0mil", "SHRatio:=" , "2.9", "IsTSV:=" , False, "OxideThicknesses:=" , [], "OxideMaterials:=" , []], "SLayer:=" , [ "Layer:=" , [ "N:=" , "Ground", "ID:=" , 6, "T:=" , "ground", "TB:=" , "bottom", "Col:=" , 4144959, "Tr:=" , 0, "Pat:=" , 1, "Vf:=" , 127, "Zones:=" , []], "SubL:=" , [ "Th:=" , "0mil", "LElev:=" , "0mil", "R:=" , "0um", "BR:=" , "0um", "SR:=" , "0um", "Mat:=" , "copper", "FilMat:=" , "FR4_epoxy"], "Neg:=" , True, "UseR:=" , False, "RMdl:=" , "Huray", "NR:=" , "0mil", "HRatio:=" , "2.9", "BRMdl:=" , "Huray", "BNR:=" , "0mil", "BHRatio:=" , "2.9", "SRMdl:=" , "Huray", "SNR:=" , "0mil", "SHRatio:=" , "2.9", "IsTSV:=" , False, "OxideThicknesses:=" , [], "OxideMaterials:=" , []], "Layer:=" , [ "N:=" , "SIwave Regions", "ID:=" , 8, "T:=" , "siwavehfsssolverregions", "Col:=" , 8355711, "Tr:=" , 60, "Pat:=" , 1, "Vf:=" , 127], "Layer:=" , [ "N:=" , "Rats", "ID:=" , 3, "T:=" , "rat", "Col:=" , 16711680, "Tr:=" , 0, "Pat:=" , 1, "Vf:=" , 127], "Layer:=" , [ "N:=" , "Errors", "ID:=" , 4, "T:=" , "error", "Col:=" , 255, "Tr:=" , 0, "Pat:=" , 1, "Vf:=" , 127, "L:=" , True], "Layer:=" , [ "N:=" , "Symbols", "ID:=" , 5, "T:=" , "symbol", "Col:=" , 8323199, "Tr:=" , 0, "Pat:=" , 1, "Vf:=" , 127], "Layer:=" , [ "N:=" , "Assembly Top", "ID:=" , 2, "T:=" , "assembly", "TB:=" , "top", "Col:=" , 16711680, "Tr:=" , 0, "Pat:=" , 1, "Vf:=" , 127, "Zones:=" , []], "Layer:=" , [ "N:=" , "Silkscreen Top", "ID:=" , 1, "T:=" , "silkscreen", "TB:=" , "top", "Col:=" , 65280, "Tr:=" , 0, "Pat:=" , 1, "Vf:=" , 127, "Zones:=" , []], "Layer:=" , [ "N:=" , "Postprocessing", "ID:=" , 9, "T:=" , "postprocessing", "Col:=" , 9017384, "Tr:=" , 60, "Pat:=" , 1, "Vf:=" , 127], "Layer:=" , [ "N:=" , "Outline", "ID:=" , 10, "T:=" , "outline", "Col:=" , 8468789, "Tr:=" , 60, "Pat:=" , 1, "Vf:=" , 127], [ "NAME:Locker", "IsLocked:=" , False ] ], "ActLyr:=" , "Top", [ "NAME:Ncs", [ "NAME:Nc", "Nam:=" , "<Power/Ground>", "Dsc:=" , "" ] ], [ "NAME:Ncs", [ "NAME:Nc", "Nam:=" , "<Power/Ground>", "Dsc:=" , "" ] ], [ "NAME:Dps" ], [ "NAME:VRMs" ] ]) |