CreateWire (Schematic Editor)
Create a wire
| UI Access | Draw>Wire | |||||||||
| Parameters |
|
|||||||||
| Return Value | String
Unique id |
Wire is created and its return value has the format Wire@<netName>;<schematicID>;<segment index list>
The Schematic ID can be found in the Symbol tab of the Properties window when you select the wire. The wire net name appears in the General tab. The parameter segment index list indicates the number of segments i.e. the segment count.
| Python Syntax | CreateWire() |
| Python Example |
|
| VB Syntax | CreateWire() |
| 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")
WireID = oEditor.CreateWire(Array("NAME:WireData", "Name:=", "", "Id:=", 261, "Points:=", Array( _
"(0.101600, 0.063500)", "(0.106680, 0.063500)", "(0.106680, 0.060960)")), Array("NAME:Attributes", "Page:=", _
1))
MsgBox "Wire ID = " & WireID