How to call an external program (.exe) after modal solution in Ansys MAPDL script

155 views Asked by At

I'm trying to call a .exe file (Matlab routine) after a modal solution in an Ansys MAPDL script. Is there an APDL command for this?

2

There are 2 answers

0
Mike R On

Please see the Mechanical APDL help on the /SYS and /SYP commands. /SYS allows us to pass a command string to the OS for execution. Normally I've only used this to do simple things like copy a file, or get a listing of files (for troubleshooting). I don't have access to Matlab. I did test sending:

/sys, python a.py

From MAPDL interactive where a.py was just print hello then quit. And that worked.

0
Argyll On

You can use system and call any .exe file.