EditWithComps [footprint manager]

Edit an existing footprint.

UI Access Not available
Parameters
Name Type Description
<FootprintName> String Composite name of the model being edited
<FootprintPropertiesArray> Array Array of model properties

<NAME>

String New simple name for the footprint

<ModTime>

Integer

An integer that corresponds to the number of seconds that have elapsed since 00:00 hours, Jan 1, 1970 UTC from the system clock.

<Library>

String Library name

<LibLocation>

String Project location

<OkayToMirror>

Boolean True to allow mirroring

<DefUnits>

String

Default length units to use if units are not specified in other parameters

<LyrArray>

Array Defines layers and StackUp layers; see details below

<ActLyr>

String Name of active layer

<ToleranceArray>

Array Optional; An array of three real numbers that specify distance tolerance, angle tolerance (in radians), and dimensionless tolerance.

<PrimitivesInfo>

 

Optional; it defines primitives using one or more of the following:

<RectInfo>,

<CircleInfo>,

<ArcInfo>,

<LineInfo>,

<PolygonInfo>,

<TextInfo>,

<ImageInfo>

See below for more details.

<PinsInfo>

  Optional; see below for more details

<ViasInfo>

  Optional; see below for more details

<EdgeportsInfo>

  Optional; see below for more details

<ComponentPropertyInfo>

   

<ScriptInfo>

Array Optional; specified for scripted footprints; see details below.

<ListOfComponentNames>

Array

The list may be empty. When not empty, each string that is listed is a component that references the footprint to be edited. Prior to editing, a clone of the footprint is made, and the components that are listed are modified so that they now refer to the clone.

Return Value

Composite name of the footprint in the form of a string. If the name requested conflicts with the name of an existing footprint, the requested name is altered to be unique, and the name returned reflects that change.

<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:=", Array[<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

EditWithComps (<FootprintName>, [ <Name>, <ModTime>, <Library>, <LibLocation>, <OkayToMirror>,<DefUnits>, <LyrsArray>, <ActLyr>, <ToleranceArray>, <PrimitivesInfo>,<PinsInfo>, <ViasInfo>,<EdgeportsInfo>,<ComponentPropertyInfo>, <ScriptInfo>],<ListOfComponentNames>)

Python Example

oFootprintManager.EditWithComps \("Nexxim Circuit Elements\Distributed\Distributed:bendo",

[NAME:bendo new name",

"ModTime:=", 1152722165,

"Library:=", "Nexxim Circuit Elements\Distributed\Distributed",

"LibLocation:=", "SysLibrary",

["NAME:PinDef",

"Pin:=", [ "n1", -0.00254, 0.00254, 0, "N", 0, 0, false, 0, true, "", false, false]

],

["NAME:PinDef",

"Pin:=", [ "n2", 0.00254, -0.00254, 1.5708, "N", 0, 0, false, 0, true, "", false, false]

],

["NAME:Graphics",

"Polygon:=", [ 0, 0, 12566272, 0, 0.00381, 0, .00127, 0.00127, 0.00127, 0.00127, 0, 0.00381, 0, 0.00381, 0.002032, 0.00127, 0.00381],

"Line:=", [0, 1, 12566272, -0.00254, 0.00254, 0, .00254],

"Line:=", [0, 1, 12566272, 0.00254, -0.00254, .00254, 0]

],

["NAME:PropDisplayMap",

"W:=", [3, 5, 0,

"Text:=", [ 2.1684E-019, 0.00504119, 0, 1, 5, false, "Arial", 0, "W=***"]

]

]

],

["MY_COMP"])