


{"id":169258,"date":"2022-05-06T19:17:41","date_gmt":"2022-05-06T19:17:41","guid":{"rendered":"\/forum\/forums\/topic\/is-it-possible-to-access-user-defined-variables-from-other-groups-containers\/"},"modified":"2022-05-09T19:01:59","modified_gmt":"2022-05-09T19:01:59","slug":"is-it-possible-to-access-user-defined-variables-from-other-groups-containers","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/is-it-possible-to-access-user-defined-variables-from-other-groups-containers\/","title":{"rendered":"Is it possible to access user-defined variables from other groups\/containers?"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>I would like to define some of my variables in the Model scope, but if I create a construction script there it prevents me from manually adding things like monitors (sometimes it&#039;s nice to put an arbitrary monitor in after designing a simulation).<\/p>\n<p>The workaround is to create a structure group and use a separate analysis group, but sometimes I would like a monitor to rely on some variable that I specified for the construction group. Is there a way for me to access a variable stored in another group? Or can I define variables in the Model group and access them from the group&#039;s Structure or Analysis group children?<\/p>\n<p><\/p>\n<\/p>\n<p>Example: I want a monitor at the end of a waveguide while I run a parameter sweep on waveguide length, &#039;WG_length&#039; . I can script this all in the model group, but then it will override any attempts to add more monitors via the GUI. I could script the waveguide in a structure group, and the monitor in the analysis group, but then the monitor will no longer have access to the &#039;WG_length&#039; variable and will not move with the waveguide during the parameter sweep.<\/p>\n","protected":false},"template":"","class_list":["post-169258","topic","type-topic","status-closed","hentry","topic-tag-fdtd","topic-tag-lumerical","topic-tag-scripting","topic-tag-variables"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_btv_view_count":["850"],"_bbp_likes_count":["0"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["169258"],"_bbp_forum_id":["27833"],"_bbp_engagement":["2592","186272"],"_bbp_voice_count":["2"],"_bbp_reply_count":["4"],"_bbp_last_reply_id":["214161"],"_bbp_last_active_id":["214161"],"_bbp_last_active_time":["2022-05-09 19:01:59"]},"test":"hacha"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/169258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/169258\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=169258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}