Hello,
I am currently working on a MODE project.
My basic code structure is the following:
switchtolayout;
select("G1");
delete;
addstructuregroup;
set("name","G1");
addrect; set("name", "substrate");
addtogroup("::model::G1");
However, when calling this script in a loop in another script I run into a problem.
The first run goes smoothly, I only recieve a warning since at first G1 doesnt exist. In the second iteration however I get the error:
Error: C:/Users/.../Test.lsf line 44: addtogroup ambiguity due to multiple objects ::model::G1
I checked that my groupscope is set properly, and I can run the select, delete commands in the prompt directly and they work.
Can anyone tell me what it is that I'm doing wrong? Sorry if this is obvious, I am still new to Lumerical. Also, is there a way to check for the existence of a group like the exist() function?
I would be really greatful for any help or insights!