Tagged: script-the-structure-group
-
-
March 17, 2022 at 11:53 pm
Hatef
SubscriberHi
I'm writing a script to add a structure group and also configure the structure group using the scripting. Similar to the post here:
https://support.lumerical.com/hc/en-us/articles/360034924093-addstructuregroup-Script-command
In the above link there is a code (posted in following) where the script is created and passed to the structure group.
myscript = "addcircle; "; myscript = myscript + "copy(1e-6); "; myscript = myscript + "selectall; "; myscript = myscript + "set("radius",radius);"; set("script",myscript);
However, I'm wondering if there is a better way to set this script instead of writing "myscript = myscript + " ABC" "
To be more clear I'm looking for something like following:
myscript = begin{
ABC;
DEF;
GHI;
}end
in both Matlab and Python such coding is possible. I believe there was another example on lumerical website where we write code to Model object using the way that I want; However, I cannot find it anymore.
Would it be possible to help me?
Thank you very much
March 18, 2022 at 9:41 pmGuilin Sun
Ansys EmployeeI am not aware of the direct way you mentioned.
The way to cascade "my script" is to have one script file, with "\" to separate lines.
We have similar method to execute Matlab code in Lumerical script: https://support.lumerical.com/hc/en-us/articles/360034407974-matlab
but not for groups. All online examples use the same method:
adduserprop - Script command
addstructuregroup - Script command
runsetup - Script command
Viewing 1 reply thread- You must be logged in to reply to this topic.
Ansys Innovation SpaceEarth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
Trending discussions- “Import optical generation” or “delta generation rate”?
- Why am I getting “process exited without calling finalize”, and how do I fix it?
- Error on Lumerical device
- Using a license file on a new license server
- Error: addfdtd is not a valid function or a variable name
- Ansys Insight: Diverging Simulations
- Ansys Insight: Transmission results greater than one
- Ansys Insight: About override mesh in FDTD: its use and settings
- Ansys Insight: Convergence issues in CHARGE
- Is there a Lumerical script command to output the Simulation and Memory requirements?
Top Contributors-
2600
-
2088
-
1319
-
1108
-
459
Top Rated Tags© 2023 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.
-