EditSymbolAndUpdateComps [symbol manager]
Edits an existing symbol; it includes a <RefPinOption> parameter, which can be used to define changes made ref pins.
| UI Access | Not available | ||||||||||||||||||||||||||||||||||||
| Parameters |
|
||||||||||||||||||||||||||||||||||||
| Return Value | The composite name of the symbol. If the name requested conflicts with the name of an existing symbol, the requested name is altered to be unique, and the name returned reflects those changes. |
| Python Syntax |
EditSymbolAndUpdateComps (<SymbolName>, [ <Name>, <ModTime>, <Library>, <LibLocation>, <PinDefInfo>,<GraphicsDataInfo>, <PropDisplayMapInfo>],<ListOfComponentNames>, <EditContext>) |
| Python Example |
oDefinitionManager = oProject.GetDefinitionManager() oSymbolManager = oDefinitionManager.GetManager("Symbol") oSymbolManager.EditSymbolAndUpdateComps("Amp_Full", [ "NAME:Amp_Full", "ModTime:=" , 1729524400, "CE:=" , 0, "Library:=" , "", "ModSinceLib:=" , False, "LibLocation:=" , "Project", "HighestLevel:=" , 1, "Normalize:=" , False, "InitialLevels:=" , [0,1], [ "NAME:PinDef", "Pin:=" , ["Port1",-0.00508,0,0,"N",0,0.00254,False,0,True,"",True,False,"Port1",True], [ "NAME:PropDisplayMap", "PinName:=" , [2,5,1, "Text:=" , [-0.00508,0.000635,0,4,5,False,"Arial",0,"Port1",False,False, "ExtentRect:=" , [0,0,0,0,-0.00508,0.00116761958303845,0.00379225143123376,0.00176829701568765,0,0,0]]] ] ], [ "NAME:PinDef", "Pin:=" , ["Port2", 0.00508,0.001,3.14159265358979,"N",0,0.00254,False,0,True,"",True,False,"Port2",True], [ "NAME:PropDisplayMap", "PinName:=" , [2,5,1, "Text:=" , [0.00508,-0.005,0,4,5,False,"Arial",0,"Port2",False,False, "ExtentRect:=" , [0,0,0,0,0.00508,0.00370761958303845,0.00379225143123376,0.00176829701568765,0,0,0]]] ] ], [ "NAME:Graphics", "Rect:=" , [0,0,0,0,0,0,0.00508,0.00508,0,0,0], "Rect:=" , [0,1,0,0,-0.00211666666666667,0,0.000423333333333333,0.000423333333333334,0,0,0] ], [ "NAME:PropDisplayMap", "FileName:=" , [4,3,0, "Text:=" , [0,0,0,4,5,False,"Arial",0,"FileName",False,False, "ExtentRect:=" , [0,0,0,0,0,0.000532619583038449,0.00679622587957061,0.00176829701568765,0,0,0]]] ] ], [], ["NAME:EditContext", "RefPinOption:=", 0, "CompName:=", "Model", ["NAME:Terminals", "TermAttributes:=", [ "M_DQ_0__AL11_IPD031-201_U2A5", "M_DQ_0__AL11_IPD031-201_U2A5", 0, 0, -1, ""], "TermAttributes:=", [ "M_DQ_0__AL11_IPD031-201_U2A5_ref", "M_DQ_0__AL11_IPD031-201_U2A5_ref", 1, 0, -1, ""], "TermAttributes:=", ["M_DQ_0__B3_G83568-001_U1B5", "M_DQ_0__B3_G83568-001_U1B5", 1, 0, -1, ""], "TermAttributes:=", [ "M_DQ_0__B3_G83568-001_U1B5_ref", "M_DQ_0__B3_G83568-001_U1B5_ref", 1, 0, -1, ""] ] ]) oDefinitionEditor.CloseEditor() |
<PinDefInfo>:
["NAME:PinDef",
"Pin:=", [<string>, # pin name
<real>, # x location
<real>, # y location
<real>, # angle in radians
<PinType>,
<real>, # line width
<real>, # line length
<bool>, # mirrored
<int>, # color
<bool>, # true if visible, false if not
<string>, # hidden net name
<OptionalPinInfo>, # optional info
<PropDisplayMapInfo>]] # optional
<PinType> – defined as a string
# "N" : normal pin
# "I" : input pin
# "O" : output pin
<OptionalPinInfo>:
# Specify both or neither
<bool>, # True if name is to be shown
<bool>, # True if number is to be shown
<PropDisplayMapInfo>:
["NAME:PropDisplayMap", <PropDisplayInfo>, <PropDisplayInfo>,...]
<PropDisplayInfo>:
[ <NameString>, [<DisplayTypeInfo>,
<DisplayLocationInfo>,
<int>, # optional, level number
<TextInfo>]]
<NameString>: <string> # PropertyName:=, where PropertyName is the name of the property to be displayed
<DisplayTypeInfo> – defined as an integer
# 0 : No display
# 1 : Display name only
# 2 : Display value only
# 3 : Display both name and value
# 4: Display evaluated value only
# 5: Display both name and evaluated value
<DisplayLocationInfo> – defined as an integer
# 0 : Left
# 1 : Top
# 2 : Right
# 3 : Bottom
# 4 : Center
# 5 : Custom placement
<GraphicsDataInfo>
["NAME:Graphics",
# 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
<EditContext>:
<RefPinOption> – defined as an integer
# 0 = implied reference to ground
# 1 = single common reference port
# 2 = individual hidden reference pins for each port
# 3 = individual reference pin per port
<CompName> – Name of the component defined as a string
<TermAttributes> – An array that includes the following:
<Terminal Name> # defined as a string
<Symbol Pin Name> # defined as a string
<InOut> # defined as an integer>
# 0=in
# 1=out
# 2= inout