


{"id":167972,"date":"2022-03-31T18:17:50","date_gmt":"2022-03-31T18:17:50","guid":{"rendered":"\/forum\/forums\/topic\/get-list-of-active-materials-in-script-lumerical\/"},"modified":"2022-05-11T22:57:27","modified_gmt":"2022-05-11T22:57:27","slug":"get-list-of-active-materials-in-script-lumerical","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/get-list-of-active-materials-in-script-lumerical\/","title":{"rendered":"Get list of active materials in script (Lumerical)"},"content":{"rendered":"<div class=\"Item-Body\">\n<div class=\"Message userContent\">\n<p>Is there a script command to get a list of the active materials in lumerical? IT seems there should be because the &#039;Check simulation and memory requirements&#039; triggers warnings for the active materials, so this list must exist somewhere in Lumerical. I need a command script to access it. <\/p>\n<p>I know the getmaterial command, but you need to know the names of the objects to do this. <\/p>\n<p>I&#039;m hoping to save myself the trouble of writing a function to traverse the objects tree to get the names of all objects, and then use &#039;haveproperty(&quot;material&quot;) to see if each object has a material. I&#039;m afraid that is not so simple for a generic N-ary tree to do this.<\/p>\n<p>Anybody else already solve this problem of getting a list of all active materials in a lumerical simulation? I want to plot each material in python plotly.<\/p>\n","protected":false},"template":"","class_list":["post-167972","topic","type-topic","status-closed","hentry","topic-tag-lumerical","topic-tag-materials","topic-tag-script"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_btv_view_count":["1090"],"_bbp_likes_count":["0"],"_bbp_subscription":["242441"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["167972"],"_bbp_forum_id":["27833"],"_bbp_engagement":["15369","30281","106247"],"_bbp_voice_count":["3"],"_bbp_reply_count":["9"],"_bbp_last_reply_id":["210351"],"_bbp_last_active_id":["210351"],"_bbp_last_active_time":["2022-05-11 22:57:27"]},"test":"andrew-perkinsonsemi-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/167972","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\/167972\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=167972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}