CreateGround (Schematic Editor)

Create a ground

UI Access Draw>Ground
Parameters
Name Type Description
<GroundProps> Array

Array("NAME:GroundProps",_

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

<Attributes> Array

Array("NAME:Attributes", _

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

Note: Page 1 always exists

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

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

"Angle:=", double, _ // Rotation angle (radians)

"Flip:=", bool), // True if mirrored

[out,retval] string id)

Return Value String

Unique id

Ground is created and the returned value has the format GPort@<portname>;<schematicID>

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

 

 

Python Syntax CreateGround()
Python Example

oEditor.CreateGround

(["NAME:GroundProps", "Id:=", 8),

["NAME:Attributes", "Page:=", 1, "X:=",

-0.04064, "Y:=", -0.00254, "Angle:=",

0, "Flip:=", false])

 

VB Syntax CreateGround()
VB Example

oEditor.CreateGround

Array("NAME:GroundProps", "Id:=", 8),

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

-0.04064, "Y:=", -0.00254, "Angle:=",

0, "Flip:=", false)

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")

Gnd = oEditor.CreateGround(Array("NAME:GroundProps", "Id:=", 144), Array("NAME:Attributes", "Page:=", _

1, "X:=", 0.11684, "Y:=", 0.06604, "Angle:=", 0, "Flip:=", false))

 

MsgBox "GndIndex =" & Gnd