


{"id":354883,"date":"2024-03-01T18:35:59","date_gmt":"2024-03-01T18:35:59","guid":{"rendered":"\/forum\/forums\/topic\/scripting-in-mechanical-accessing-model\/"},"modified":"2024-03-04T15:36:16","modified_gmt":"2024-03-04T15:36:16","slug":"scripting-in-mechanical-accessing-model","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/scripting-in-mechanical-accessing-model\/","title":{"rendered":"Scripting in Mechanical &#8211; Accessing &#8216;Model&#8217;"},"content":{"rendered":"<p>When writing a script in Mechanical, the entire Ansys Python class is already in there, and to access the Model, you just type &#8216;Model&#8217;.&nbsp; I&#8217;m working on a project where I import another script into Mechanical, but because it&#8217;s imported, it doesn&#8217;t have the Ansys namespace.<\/p>\n<p>I can&#8217;t seem to find what I need to import from Ansys to access Model.&nbsp; Seems like it should be Ansys.ACT.Automation.Mechanical.Model, but that doesn&#8217;t give any options to access anything within the model (e.g., Model.Analyses).<\/p>\n<p>Any clue as to where all of this info is hidden in the classs?<\/p>\n","protected":false},"template":"","class_list":["post-354883","topic","type-topic","status-closed","hentry","topic-tag-python-scripting"],"aioseo_notices":[],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["266147","170445"],"_bbp_author_ip":["23.206.193.154"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["689"],"_bbp_topic_status":["answered"],"_bbp_topic_id":["354883"],"_bbp_forum_id":["27796"],"_bbp_engagement":["170445","266147"],"_bbp_voice_count":["2"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["355187"],"_bbp_last_active_id":["355187"],"_bbp_last_active_time":["2024-03-04 14:49:15"]},"test":"m-littleholtec-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/354883","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":1,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/354883\/revisions"}],"predecessor-version":[{"id":355193,"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/354883\/revisions\/355193"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=354883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}