{"id":164754,"date":"2023-03-17T08:58:36","date_gmt":"2023-03-17T08:58:36","guid":{"rendered":"\/knowledge\/forums\/topic\/how-to-access-a-constant-or-a-variable-in-an-ensight-script\/"},"modified":"2023-07-31T12:26:12","modified_gmt":"2023-07-31T12:26:12","slug":"how-to-access-a-constant-or-a-variable-in-an-ensight-script","status":"publish","type":"topic","link":"https:\/\/innovationspace.ansys.com\/knowledge\/forums\/topic\/how-to-access-a-constant-or-a-variable-in-an-ensight-script\/","title":{"rendered":"How to access a constant or a variable in an EnSight script?"},"content":{"rendered":"<p>In order to access a constant or a variable, it must be active. In the GUI you activate it by checking the activation box in the &#8220;tree&#8221;. From a script you do the same by using ensight.variables.activate(&#8220;Name_of_constant_or_variable&#8221;)  In the next step, you can then access it with ensight.ensvariable(&#8220;Name_of_constant_or_variable&#8221;)[0]  For transient cases, it&#8217;s only necessary to activate the variable once. Then access it from within a loop over all time steps.<\/p>\n","protected":false},"template":"","class_list":["post-164754","topic","type-topic","status-publish","hentry","topic-tag-10-2","topic-tag-ensight","topic-tag-fluid-dynamics","topic-tag-scripting"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_wp_page_template":["default"],"_bbp_last_active_time":["3-15-2023  20:20:18"],"_bbp_forum_id":["27796"],"_bbp_author_ip":["23.56.168.180"],"_btv_view_count":["904"],"siebel_km_number":["2058702"],"product_version":["10.2"],"km_published_date":["2019-03-26T00:00:00.000Z"],"family":["Fluid Dynamics"],"application_name":["Ensight"]},"test":"articlesansys-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164754","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics"}],"about":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/topics\/164754\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/knowledge\/wp-json\/wp\/v2\/media?parent=164754"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}