


{"id":372849,"date":"2024-07-20T14:02:36","date_gmt":"2024-07-20T14:02:36","guid":{"rendered":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/"},"modified":"2024-07-20T14:02:36","modified_gmt":"2024-07-20T14:02:36","slug":"ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script","status":"closed","type":"topic","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/","title":{"rendered":"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script?"},"content":{"rendered":"<p>I want to open another project in prepost scripts for automatic calibrations.<\/p>\n<p>To build Prepost Scripts, I need to see how the API works with Python Shell.<\/p>\n<p>Here are two photos describing my situation.&nbsp;<\/p>\n<p>When I try to open another file from one project file, I get a popup saying &ldquo;Do you want to save the current project?&#8221;.&nbsp; This stops the execution of my script.<\/p>\n<p>pj1 is the initial project file. I am trying to open pj from pj2.<\/p>\n<p>app.OpenProject(ini) worked correctly after I put &#8220;Yes&#8221; on the popup.&nbsp;I also did the &ldquo;project.SaveProject()&rdquo; command and a popup appeared.<\/p>\n<p>&nbsp;<\/p>\n<p>How can I solve this problem?<\/p>\n<p>-Is there a script to disable popup or select &#8220;Yes&#8221;?<br \/>-Or is there a way to force a file to open from a script?<\/p>\n<p>I have looked in the API documentation, but I have not found anything about app.OpenProject() or a command to open another file.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>If anyone knows how to do this, please respond.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" title=\"Scripts 1\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/07\/20-07-2024-1721482891-screenshot1.png\" alt=\"\"><\/p>\n<p><span><img decoding=\"async\" title=\"Scripts 2\" src=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/07\/20-07-2024-1721482926-screenshot2.png\" alt=\"\"><\/span><\/p>\n","protected":false},"template":"","class_list":["post-372849","topic","type-topic","status-closed","hentry","topic-tag-ansys","topic-tag-ansys-applications","topic-tag-api","topic-tag-documentation","topic-tag-rocky-dem-1","topic-tag-solver-errors"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"I want to open another project in prepost scripts for automatic calibrations.To build Prepost Scripts, I need to see how the API works with Python Shell.Here are two photos describing my situation. When I try to open another file from one project file, I get a popup saying \u201cDo you want to save the current project?&quot;.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/\" \/>\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=\"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script? | Ansys Learning Forum\" \/>\n\t\t<meta property=\"og:description\" content=\"I want to open another project in prepost scripts for automatic calibrations.To build Prepost Scripts, I need to see how the API works with Python Shell.Here are two photos describing my situation. When I try to open another file from one project file, I get a popup saying \u201cDo you want to save the current project?&quot;.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/07\/20-07-2024-1721482891-screenshot1.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/07\/20-07-2024-1721482891-screenshot1.png\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2024-07-20T14:02:36+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-07-20T14:02:36+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n\t\t<meta name=\"twitter:title\" content=\"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script? | Ansys Learning Forum\" \/>\n\t\t<meta name=\"twitter:description\" content=\"I want to open another project in prepost scripts for automatic calibrations.To build Prepost Scripts, I need to see how the API works with Python Shell.Here are two photos describing my situation. When I try to open another file from one project file, I get a popup saying \u201cDo you want to save the current project?&quot;.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/07\/20-07-2024-1721482891-screenshot1.png\" \/>\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\\\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\\\/#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-tag\\\/documentation\\\/#listItem\",\"name\":\"documentation\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic-tag\\\/documentation\\\/#listItem\",\"position\":3,\"name\":\"documentation\",\"item\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic-tag\\\/documentation\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\\\/#listItem\",\"name\":\"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/topics\\\/#listItem\",\"name\":\"Topics\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\\\/#listItem\",\"position\":4,\"name\":\"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic-tag\\\/documentation\\\/#listItem\",\"name\":\"documentation\"}}]},{\"@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\\\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\\\/#webpage\",\"url\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\\\/\",\"name\":\"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script? | Ansys Learning Forum\",\"description\":\"I want to open another project in prepost scripts for automatic calibrations.To build Prepost Scripts, I need to see how the API works with Python Shell.Here are two photos describing my situation. When I try to open another file from one project file, I get a popup saying \\u201cDo you want to save the current project?\\\".\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/innovationspace.ansys.com\\\/forum\\\/forums\\\/topic\\\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\\\/#breadcrumblist\"},\"datePublished\":\"2024-07-20T14:02:36+00:00\",\"dateModified\":\"2024-07-20T14:02:36+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":"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script? | Ansys Learning Forum","description":"I want to open another project in prepost scripts for automatic calibrations.To build Prepost Scripts, I need to see how the API works with Python Shell.Here are two photos describing my situation. When I try to open another file from one project file, I get a popup saying \u201cDo you want to save the current project?\".","canonical_url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BreadcrumbList","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/#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-tag\/documentation\/#listItem","name":"documentation"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/documentation\/#listItem","position":3,"name":"documentation","item":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/documentation\/","nextItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/#listItem","name":"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/topics\/#listItem","name":"Topics"}},{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/#listItem","position":4,"name":"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script?","previousItem":{"@type":"ListItem","@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/documentation\/#listItem","name":"documentation"}}]},{"@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\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/#webpage","url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/","name":"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script? | Ansys Learning Forum","description":"I want to open another project in prepost scripts for automatic calibrations.To build Prepost Scripts, I need to see how the API works with Python Shell.Here are two photos describing my situation. When I try to open another file from one project file, I get a popup saying \u201cDo you want to save the current project?\".","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/#website"},"breadcrumb":{"@id":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/#breadcrumblist"},"datePublished":"2024-07-20T14:02:36+00:00","dateModified":"2024-07-20T14:02:36+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":"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script? | Ansys Learning Forum","og:description":"I want to open another project in prepost scripts for automatic calibrations.To build Prepost Scripts, I need to see how the API works with Python Shell.Here are two photos describing my situation. When I try to open another file from one project file, I get a popup saying \u201cDo you want to save the current project?&quot;.","og:url":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/","og:image":"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/07\/20-07-2024-1721482891-screenshot1.png","og:image:secure_url":"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/07\/20-07-2024-1721482891-screenshot1.png","article:published_time":"2024-07-20T14:02:36+00:00","article:modified_time":"2024-07-20T14:02:36+00:00","twitter:card":"summary_large_image","twitter:title":"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script? | Ansys Learning Forum","twitter:description":"I want to open another project in prepost scripts for automatic calibrations.To build Prepost Scripts, I need to see how the API works with Python Shell.Here are two photos describing my situation. When I try to open another file from one project file, I get a popup saying \u201cDo you want to save the current project?&quot;.","twitter:image":"https:\/\/innovationspace.ansys.com\/forum\/wp-content\/uploads\/sites\/2\/2024\/07\/20-07-2024-1721482891-screenshot1.png"},"aioseo_meta_data":{"post_id":"372849","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 16:36:39","updated":"2024-10-28 16:36:39","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\t<a href=\"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/documentation\/\" title=\"documentation\">documentation<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script?\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":"documentation","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic-tag\/documentation\/"},{"label":"[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script?","link":"https:\/\/innovationspace.ansys.com\/forum\/forums\/topic\/ansys-rocky-how-do-i-open-the-other-project-in-python-shell-or-prepost-script\/"}],"acf":[],"custom_fields":[{"0":{"_bbp_subscription":["438509","66199"],"_bbp_author_ip":["2400:2411:9941:a300:51f2:e0a1:2569:72d1"]," _bbp_last_reply_id":["0"],"_btv_view_count":["605"]," _bbp_likes_count":["0"],"_bbp_topic_status":["unanswered"],"_bbp_topic_id":["372849"],"_bbp_forum_id":["27796"],"_bbp_engagement":["66199","438509"],"_bbp_voice_count":["2"],"_bbp_reply_count":["3"],"_bbp_last_reply_id":["373275"],"_bbp_last_active_id":["373275"],"_bbp_last_active_time":["2024-07-23 15:16:06"]},"test":"yanahiro0214gmail-com"}],"_links":{"self":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/topics\/372849","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\/372849\/revisions"}],"wp:attachment":[{"href":"https:\/\/innovationspace.ansys.com\/forum\/wp-json\/wp\/v2\/media?parent=372849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}