CutOutSubDesign (Layout Editor)

Use: Cut out a subdesign.

Command: CutOutSubDesign

Syntax: oEditor.CutOutSubDesign Array(

"NAME:Params",

"Name:=", <"name">,

"EMDesign:=", <boolean>,

"SubDesign:=", <boolean>,

"Within:=", <boolean>,

"Without:=", <boolean>,

"AutoGenExtent":=<boolean>,

"Expansion":=<double>,

"RoundCorner":=<boolean>,

"Increments":=<integer>,

"ExtentSel:=", Array(<"extent-poly">, …),

Array("NAME:Nets", "net:=", Array(<"net-name">, <clip>), …))

In place of "ExtentSel:=", Array(<"extent-poly">, …) an explicit polygon can be used:

   "Extent:=", Array("cl:=", true,

      "pt:=", Array(U:=", <"units">, "x:=", <double>, "y:=" <double>, …))

 

Parameters: Name — name of the cutout design.

EMDesign — if true, create an EM design, otherwise create a Nexxim design.

Within — boolean; cut out the interior region.

Without — boolean; cut out the exterior region.

AutoGenExtent — boolean; when true, Circuit disregards both ExtentSel and Extent. Circuit will instead generate a polygonal shape around all nets which are not clipped.

Expansion — double; similar to the Auto Generate Extent dialog box. However, this is always a unitless fraction. By default it is set to .1.

RoundCorner — boolean; identical to the Auto Generate dialog box. By default this is set to true. In general, rounded corners are preferred when the cutout shape has acute or nea-acute angles

Increments — integer; this is from the Auto Generate Dialog, and by default is set to true. This can greatly increase the running time and a small increase can make a big difference. It is probably best to experiment with this parameter first, rather than set it arbitrarily.

ExtentSel— an array of extent polygon names.

Extent — alternative to ExtentSel; an explicit polygon defined by coordinates.

cl — must always be true; indicates that the polygon is closed.

U — coordinate units, e.g. "mm"

pt — array of coordinate values.

x — x coordinate value

y — y coordinate value

Nets — the net information.

net — array of net information.

<"net-name">

      "<no net trace>" — special value referring to traces not in a net.

      "<no net fill>" — special value refereeing to fill polygons not in a net.

      <design>:<net> — net within a particular design.

      <net> — net within the active design.

<clip> — boolean true/false; if true, the net is clipped against the extent else the net is included but not clipped.

Return Value: None

Example: Using "extent_poly" as the selection extent:

oEditor.CutOutSubDesign Array("NAME:Params",

"Name:=", "EMDesign1_cutout",

"EMDesign:=", true,

"SubDesign:=", false,

"Within:=", true,

"Without:=", false,

"ExtentSel:=", Array("extent_poly", …),

Array("NAME:Nets",

"net:=", Array("<no net trace>", true),

"net:=", Array("<no net fill>", true),

"net:=", Array("EMDesign1:GND", true) … ))

Example: Example using an explicit polygon as the selection extent:

oEditor.CutOutSubDesign Array("NAME:Params",

"Name:=", "EMDesign1_cutout",

"EMDesign:=", true,

"SubDesign:=", false,

"Within:=", true,

"Without:=", false,

"Extent:=", Array(

"cl:=", true,

"pt:=", Array(

"U:=", "mm",

"x:=", 0,

"y:=" 0, ) ),

Array("NAME:Nets",

"net:=", Array("<no net trace>", true),

"net:=", Array("<no net fill>", true),

"net:=", Array("EMDesign1:GND", true) … ))

Example: That will create a cutout around first the pos and then the neg trace from the Sample Project "Diff_Via" under Open Samples/EM/SI:

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

Set oDesign = oProject.SetActiveDesign("diffViaNominal")

Set oEditor = oDesign.SetActiveEditor("Layout")

oEditor.CutOutSubDesign Array("NAME:Params", "Name:=", "diffViaNominal_pos", "EMDesign:=", _

true, "SubDesign:=", false, "Within:=", true, "Without:=", false, "AutoGenExtent:=", _

true, "Expansion:=", 0.1, "RoundCorners:=", false, "Increments:=", 1, "ExtentSel:=", Array(),

Array("NAME:Nets", "net:=", Array( _

"diffViaNominal:neg", true), "net:=", Array("diffViaNominal:pos", false)))

oEditor.CutOutSubDesign Array("NAME:Params", "Name:=", "diffViaNominal_neg", "EMDesign:=", _

true, "SubDesign:=", false, "Within:=", true, "Without:=", false, "AutoGenExtent:=", _

true, "Expansion:=", 0.1, "RoundCorners:=", false, "Increments:=", 1, "ExtentSel:=", Array(),

Array("NAME:Nets", "net:=", Array( _

"diffViaNominal:neg", false), "net:=", Array("diffViaNominal:pos", true)))

Note that in this example, each sub design should have its own name, otherwise the results are not well defined. Also note that the "false" after the net indicates that it will be used to build the extent outline. "True" means that the net will be included but will be trimmed.