CreateArc (Schematic Editor)

Create an arc

UI Access Draw>Primitive>Arc
Parameters
Name Type Description
<ArcData> Array

Array("NAME:ArcData" _

"x:=", double, _ // X position of the object

"y:=", double, _ // Y position of the object

"Radius:=", double, _ // Radius of the circle

"StartAng:=", double,_ // Start angle of the arc (radians)

"EndAng:=", double, _ // End angle of the arc (radians)

"LineWidth:=", double, // the width of the line, in meters

"Color:=", int, // the RBG value of the arc color

"Id:=", int), // [Opt=New id] Id for this item

<Attributes> Array

Array("NAME:Attributes", _

"Page:=", int) _ // [Opt=1] Page number (one-based)

[out,retval] string id)

Return Value String

Unique id

Arc is created with the format SchObj@<schematicID>

The Schematic ID can be found on the Symbols tab of the Properties window when you select the arc.

 

Python Syntax CreateArc()
Python Example

oEditor.CreateArc

(["NAME:ArcData", _

"X:=", -0.004318, "Y:=", -0.00127, _

"Radius:=", 0.00297299377732279, _

"StartAng:=", 1.9195673303788, _

"EndAng:=", 3.32144615338227, _

"Id:=", 10], _ ["NAME:Attributes", "Page:=", 1])

 

VB Syntax CreateArc()
VB Example

oEditor.CreateArc

Array("NAME:ArcData", _

"X:=", -0.004318, "Y:=", -0.00127, _

"Radius:=", 0.00297299377732279, _

"StartAng:=", 1.9195673303788, _

"EndAng:=", 3.32144615338227, _

"Id:=", 10), _

Array("NAME:Attributes", "Page:=", 1)

 

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 ArcID

ArcID = oEditor.CreateArc(Array("NAME:ArcData", "X:=", 0.10414, "Y:=", 0.08382, "Radius:=", _

0.00915810023967853, "StartAng:=", 2.15879893034246, "EndAng:=", _

5.49778714378214, "LineWidth:=", 0, "Color:=", 0, "Id:=", 48), Array("NAME:Attributes", "Page:=", _

1))

MsgBox "Arc ID = " & ArcID