TAGGED: ansys, Ansys Applications, api, documentation, rocky-dem, solver-errors
-
-
July 20, 2024 at 2:02 pmyanahiro0214Subscriber
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 “Do you want to save the current project?". This stops the execution of my script.
pj1 is the initial project file. I am trying to open pj from pj2.
app.OpenProject(ini) worked correctly after I put "Yes" on the popup. I also did the “project.SaveProject()” command and a popup appeared.
How can I solve this problem?
-Is there a script to disable popup or select "Yes"?
-Or is there a way to force a file to open from a script?I have looked in the API documentation, but I have not found anything about app.OpenProject() or a command to open another file.
If anyone knows how to do this, please respond.
-
July 22, 2024 at 1:25 pmJackson GomesAnsys Employee
Hi Hiroki Yanagawa.
You need to save your project before execute the script to determine the path of the PrjectFilename, or you can determine the path using .SaveProject('PATH')
You can find more information about prepost scripting on HELP MENU | MANUALS | Prepost Scripting manual. You can also download and debug some Ready to use scripts, accessing HELP MENU|READY-TO-USE-SCRIPTS| Download scripts.
Best Regards
-
July 22, 2024 at 3:43 pmyanahiro0214Subscriber
Dear Jackson Gomes,
Thank you very much for your guidance. Your instructions helped me resolve the issue. I appreciate your prompt and detailed response.
Best regards,
Hiroki Yanagawa
-
July 23, 2024 at 3:16 pmJackson GomesAnsys Employee
Hello Hiroki,
I'm very glad to hear that my instructions helped you resolve the issue. Thank you for your feedback.
Best regards,
-
-
- The topic ‘[Ansys Rocky] How do I open the other project in Python Shell or Prepost Script?’ is closed to new replies.
- Speed up simulation in HFSS
- Workbench license error
- ansys fluent error when opening it “unexpected license problem”
- Unexpected error on Workbench: Root element not found.
- not able to get result
- Unable to recover corrupted project in Workbench
- Unattended (silent) installation of 2024R2 & -productfile switch
- Unexpected issues with SCCM deployment of Ansys Fluids and Structures 2024 R1
- Questions and recommendations: Septum Horn Antenna
- AQWA: Hydrodynamic response error
-
1191
-
513
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.