There are APDL commands in the ANSYS manual that can be used to bring up a window as a message box or an input box. How can I do something similar using APDL from within Workbench?

There are two approaches:

(1) In a command object in Simulation, add the following line:

/sys,msg %username% "This is my message."

The %username% will fill in automatically with the logged-in username, and you can change the "This is my message" to whatever you need. It should be noted that will NOT block the analysis, as "msg" seems to be executed in its own thread. In addition, it has been reported that this message box will automatically close after some duration of time.

(2) Create a new file with VBS extension (e.g., message.vbs), and add the following line to that file:

msgbox "This is my message." , 0, "My custom message box"

Then, from a command object in Simulation, use one of the following two commands:

! this command will block the analysis from proceeding
/sys,wscript C:somelocationmessage.vbs

! this command will allow the analysis to proceed (runs in another thread)
/sys,start wscript C:somelocationmessage.vbs

Show Form
No comments yet. Be the first to add a comment!