CreateRectangle (Schematic Editor)
Create a rectangle
| UI Access | Draw>Primitive>Rectangle | |||||||||
| Parameters |
|
|||||||||
| Return Value | String
Unique id |
Rectangle 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 rectangle.
| Python Syntax | CreateRectangle() |
| Python Example |
|
| VB Syntax | CreateRectangle() |
| 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")
rectangleID = oEditor.CreateRectangle(Array("NAME:RectData", "X1:=", 0.1016, "Y1:=", 0.0635, "X2:=", _
0.10414, "Y2:=", 0.06096, "LineWidth:=", 0, "BorderColor:=", 0, "Fill:=", 0, "Color:=", _
0, "Id:=", 9), Array("NAME:Attributes", "Page:=", 1))
MsgBox "Rectangle ID = " & rectangleID