TAGGED: ansys-workbench, automation-code, error, macros-scripting, python, workbench
-
-
February 18, 2024 at 5:29 am
Jett22
SubscriberHello!
I have been developing python scripts which automate some routines within ansys workbench. I usually initialize the scripts through the command line. Sometimes random error messages pop up during startup, which I manually dismiss, and the automation script continues to work as expected. Is there a python macro command that does the following to fix this issue:
if: an error message pops up
   *click "okay" to dismiss the message prompt*
endÂ
Thank you for any help!
Jett
-
February 19, 2024 at 3:31 pm
Aniket
Forum ModeratorCan you please give example of such errors? if you can give some details about your workflow along with that will be helpful too.
-Aniket
-
February 19, 2024 at 6:49 pm
Jett22
SubscriberHi Aniket!
The errors are mostly GUI errors or just Project schematic errors when ANSYS originally opens. For example, a common error is: "Unexpected error while refreshing pane ProjectSchematic: Exception has been thrown by the target of an invocation."Â 99% of the time I supress these random errors and the automation works as expected.
I initialize these Automation scripts from the command line. The automation workflow is usually editing a parameter set and running all unsolved design points.
All I am looking for is the Macro that does:Â
if: an error message pops up
   *click "okay" to dismiss the message prompt*
endÂ
I have tried to record a script but I cannot create an error to create the script it if that makes any sense
Thank you
Jett
-
February 20, 2024 at 4:14 am
mjmiddle
Ansys EmployeeNo, you cannot supress popup windows, but you can launch workbench in batch, so there is no GUI displayed:
"ANSYS Inc\v232\Framework\bin\Win64\RunWB2.exe" -B -R my_script.py
Using the -R or -E argument will force it to run in batch mode even without -B."ANSYS Inc\v232\Framework\bin\Win64\runwb2.bat" -R my_script.txt
But you should be more concerned why you are getting error messages. Try deleting or renaming the Ansys cache while workbench is closed to reset all settings:
%APPDATA%\Ansys
You may have something wrong with your Ansys installation, or you are launching a network installation and do not have good network connectivity.
-
- The topic ‘Suppressing error pop-ups using ansys workbench python script’ is closed to new replies.
- The legend values are not changing.
- LPBF Simulation of dissimilar materials in ANSYS mechanical (Thermal Transient)
- Convergence error in modal analysis
- APDL, memory, solid
- How to model a bimodular material in Mechanical
- Meaning of the error
- Simulate a fan on the end of shaft
- Real Life Example of a non-symmetric eigenvalue problem
- Nonlinear load cases combinations
- How can the results of Pressures and Motions for all elements be obtained?
-
4047
-
1467
-
1308
-
1156
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.