CreateGlobalPort (Schematic Editor)
Create a global port and enable placement on the schematic
| UI Access | Draw>Global Port | |||||||||||||||||||||||||||
| Parameters |
|
|||||||||||||||||||||||||||
| Return Value |
String PortID, the identifier that can be used for this port in script operations involving this schematic |
Global port is created and the return value has the format GPort@<portName>;<schematicID>
The Schematic ID can be found in the Properties window on the
Symbols tab when you select the global port.
| Python Syntax | CreateGlobalPort(["NAME:GlobalPortProps", "Name:=", <portname>, "Id:=", <id>], ["NAME:Attributes", "Page:=", <pagenumber>, "X:=", <xval>, "Y:=", <yval>, "Angle:=", <angle>, [or "Degrees:=", <degrees> ,] "Flip:=", <flip>]) |
| Python Example |
|
| VB Syntax | CreateGlobalPort(Array("NAME:GlobalPortProps", "Name:=", <portname>, "Id:=", <id>), Array("NAME:Attributes", "Page:=", <pagenumber>, "X:=", <xval>, "Y:=", <yval>, "Angle:=", <angle>, [or "Degrees:=", <degrees> ,] "Flip:=", <flip>) |
| VB Example |
|
VB Example:
Dim oAnsoftApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModule
Set oAnsoftApp = CreateObject("Ansoft.ElectronicsDesktop")
Set oDesktop = oAnsoftApp.GetAppDesktop()
oDesktop.RestoreWindow
Set oProject = oDesktop.SetActiveProject("Project4")
Set oDesign = oProject.SetActiveDesign("Circuit1")
Set oEditor = oDesign.SetActiveEditor("SchematicEditor")
Dim GPort
GPort = oEditor.CreateGlobalPort(Array("NAME:GlobalPortProps", "Name:=", "G_1", "Id:=", 68), Array("NAME:Attributes", "Page:=", _
1, "X:=", 0.11684, "Y:=", 0.0635, "Angle:=", 0, "Flip:=", false))
MsgBox "Port = " & GPort