Please enable JavaScript to view this site.

Knowledge Base

Navigation: Scripting Language > Adding Objects

addstructuregroup

We've made some changes. Use 'Ctrl-F5' to clear your browser cache.
Scroll Prev Top Next More

Adds a structure group to the simulation environment.  Structure groups are very convenient when you want to parametrize your design.  You can define different parameters for the structure group and use the "setup" script to create your geometry (along with monitors and/or sources) according to those parameter values.

 

Supported Product: FDTD, MODE, DEVICE

 

Syntax

Description

addstructuregroup;

Adds a structure group to the simulation environment.

This function does not return any data.

 

Example

Add a structure group and put a rectangle in it.

addstructuregroup;

set("name","group");

addrect;

addtogroup("group");

 

Create a structure group. Add a user property named "radius" and set up the script in the structure group to add two circles to the group and set their radius to the value of the user property "radius".

addstructuregroup;

adduserprop("radius",2,0.5e-6);

myscript =      "addcircle; \n";

myscript = myscript + "copy(1e-6); \n";

myscript = myscript + "selectall; \n";

myscript = myscript + "set(\"radius\",radius);";

set("name","dimer");

set("script",myscript); 

 

NOTE: The "myscript" string in the script above uses the escape character \n for new line and \" for double quotes within the string.

 

See Also

Adding Objects, addtogroup, adduserprop, addgroup, addanalysisgroup, set

Copyright Lumerical Inc. | Privacy | Site Map