CreatePolygon (Schematic Editor)
Create a polygon
| UI Access | Draw>Primitive>Polygon | |||||||||
| Parameters |
|
|||||||||
| Return Value | String
Unique id |
Polygon is created and the return value has the format
SchObj@<schematicID>
The Schematic ID can be found in the Properties window on the Symbol tab when you select the polygon.
| Python Syntax | CreatePolygon() |
| Python Example |
|
| VB Syntax | CreatePolygon() |
| 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")
polygonID = oEditor.CreatePolygon(Array("NAME:PolygonData", "Points:=", Array( _
"(0.101600, 0.058420)", "(0.101600, 0.060960)", "(0.101600, 0.058420)", _
"(0.099060, 0.060960)", "(0.101600, 0.060960)", "(0.101600, 0.058420)", _
"(0.101600, 0.060960)", "(0.101600, 0.060960)"), "LineWidth:=", 0, "BorderColor:=", _
0, "Fill:=", 0, "Color:=", 0, "Id:=", 218), Array("NAME:Attributes", "Page:=", 1))
MsgBox "Polygon ID = " & polygonID