


{"id":251605,"date":"2023-02-26T20:56:07","date_gmt":"2023-02-26T20:56:07","guid":{"rendered":"\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/"},"modified":"2023-02-26T20:56:07","modified_gmt":"2023-02-26T20:56:07","slug":"active-mechanical-system-name-in-act-scrippting","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/","title":{"rendered":"Active mechanical system name in ACT scrippting"},"content":{"rendered":"<p>Hi&nbsp;<\/p>\n<p>I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text) of the system that is currently in use, without having to know its index in the project.&nbsp;<\/p>\n<p>My current code to get the Display name of the project and which runs in Mechanical looks like:&nbsp;<\/p>\n<div>\n<div>import wbjn<\/div>\n<div>WB_cmds=&#8221;&#8221;&#8221;<\/div>\n<div>system1 = GetAllSystems()[1]<\/div>\n<div>my_name = system1.DisplayText<\/div>\n<div>returnValue(my_name)<\/div>\n<div>&#8220;&#8221;&#8221;<\/div>\n<div>system_name=wbjn.ExecuteCommand(ExtAPI,WB_cmds)<\/div>\n<div>then I use the system_name to create a filepath where the txt file of the solution should be stored.&nbsp;<\/div>\n<\/div>\n<p>Unfortunately, this is not what I want because I would have to know the GetAllSystems index of every system and change it manually.&nbsp;<br \/>I have also though about using GetSystem(Name=&#8221;Static1&#8243;), but I run into the same problem that I would have to know the name of the system to start with, rather than retrieving it from WB.&nbsp;<\/p>\n<p>Do you have any better approaches?&nbsp;<\/p>\n","protected":false},"template":"","class_list":["post-251605","topic","type-topic","status-closed","hentry"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Hi I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text)\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Ansys Learning Forum | Ansys Innovation Space\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Active mechanical system name in ACT scrippting | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"Hi I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text)\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2023-02-26T20:56:07+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2023-02-26T20:56:07+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Active mechanical system name in ACT scrippting | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hi I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text)\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/active-mechanical-system-name-in-act-scrippting\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/active-mechanical-system-name-in-act-scrippting\\\/#listItem\",\"name\":\"Active mechanical system name in ACT scrippting\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/active-mechanical-system-name-in-act-scrippting\\\/#listItem\",\"position\":3,\"name\":\"Active mechanical system name in ACT scrippting\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"name\":\"Topics\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/active-mechanical-system-name-in-act-scrippting\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/active-mechanical-system-name-in-act-scrippting\\\/\",\"name\":\"Active mechanical system name in ACT scrippting | Ansys Learning Forum\",\"description\":\"Hi I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text)\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/active-mechanical-system-name-in-act-scrippting\\\/#breadcrumblist\"},\"datePublished\":\"2023-02-26T20:56:07+00:00\",\"dateModified\":\"2023-02-26T20:56:07+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/\",\"name\":\"Ansys Learning Forum\",\"description\":\"Ansys Innovation Space\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Active mechanical system name in ACT scrippting | Ansys Learning Forum","description":"Hi I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text)","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","position":1,"name":"Home","item":"https:\/\/innovationspace.ansys.com\/forum","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","position":2,"name":"Topics","item":"https:\/\/innovationspace.ansys.com\/forum\/topics\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/#listItem","name":"Active mechanical system name in ACT scrippting"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/#listItem","position":3,"name":"Active mechanical system name in ACT scrippting","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","name":"Topics"}}]},{"@type":"Organization","@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization","name":"Ansys Learning Forum","description":"Ansys Innovation Space","url":"https:\/\/innovationspace.ansys.com\/forum\/"},{"@type":"WebPage","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/","name":"Active mechanical system name in ACT scrippting | Ansys Learning Forum","description":"Hi I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text)","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/#breadcrumblist"},"datePublished":"2023-02-26T20:56:07+00:00","dateModified":"2023-02-26T20:56:07+00:00"},{"@type":"WebSite","@id":"https:\/\/innovationspace.ansys.com\/forum\/#website","url":"https:\/\/innovationspace.ansys.com\/forum\/","name":"Ansys Learning Forum","description":"Ansys Innovation Space","inLanguage":"en-US","publisher":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#organization"}}]},"og:locale":"en_US","og:site_name":"Ansys Learning Forum | Ansys Innovation Space","og:type":"article","og:title":"Active mechanical system name in ACT scrippting | Ansys Learning Forum","og:description":"Hi I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text)","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/","article:published_time":"2023-02-26T20:56:07+00:00","article:modified_time":"2023-02-26T20:56:07+00:00","twitter:card":"summary_large_image","twitter:title":"Active mechanical system name in ACT scrippting | Ansys Learning Forum","twitter:description":"Hi I am writting a code which saves my temperature solutions directly as a text file after the solution is calculated. For the name of the .txt file I would like to also include the name of my system. In my project I have many systems and I want to just get the name (Display Text)"},"aioseo_meta_data":{"post_id":"251605","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"content","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":true,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2024-10-28 18:46:07","updated":"2024-10-28 18:46:07","ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\/topics\/\" title=\"Topics\">Topics<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tActive mechanical system name in ACT scrippting\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/innovationspace.ansys.com\/forum"},{"label":"Topics","link":"https:\/\/innovationspace.ansys.com\/forum\/topics\/"},{"label":"Active mechanical system name in ACT scrippting","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/active-mechanical-system-name-in-act-scrippting\/"}],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["257168","200","218419"],"_bbp_author_ip":["23.192.164.18"]," _bbp_last_reply_id":["0"]," _bbp_likes_count":["0"],"_btv_view_count":["1066"],"_bbp_topic_status":["unanswered"],"_bbp_status":["publish"],"_bbp_topic_id":["251605"],"_bbp_forum_id":["27791"],"_bbp_engagement":["200","218419","257168"],"_bbp_voice_count":["3"],"_bbp_reply_count":["2"],"_bbp_last_reply_id":["344030"],"_bbp_last_active_id":["344030"],"_bbp_last_active_time":["2024-01-10 16:37:14"]},"test":"estefania-vegapugadlr-de"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/251605","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\/251605\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=251605"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}