TAGGED: ansys, Ansys Applications, api, documentation, rocky-dem, solver-errors
-
-
July 20, 2024 at 2:02 pm
yanahiro0214
SubscriberI 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 pm
Jackson Gomes
Ansys EmployeeHi 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 pm
yanahiro0214
SubscriberDear 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 pm
Jackson Gomes
Ansys EmployeeHello 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.
- Workbench license error
- Unable to connect to the license
- lmgrd is not running: License server machine is down or not responding.
- Moment Reaction probe with Large deformation
- Running multiple LS-DYNA simulations with batch files
- Problem with ANSYS installation
- Ansys 2025 R1 Student Licensing Issue
- Ansys with Vmware and CPU configuration : I’m lost, good practice?
-
2733
-
959
-
814
-
599
-
591
© 2025 Copyright ANSYS, Inc. All rights reserved.