Use the winexec function to start ANSYS.
Winexec ("D: // program files // ANSYS Inc // v90 // ANSYS // bin // intel // ansys90.exe", 1 );
The key is to create start90.ans in the directory where your program runs (in the same directory as your EXE file) (if it is 8.0, use start80.ans). Add this sentence to the file.
/Input, E:/awxfansys/T1-A1-C1/500-2_up, Mac
/Input command for help
ANSYS will automatically read this file at startup, and many settings can be added here
In addition to the program running directory, start90.ans can be stored in the working directory and the ANSYS system directory.
Specific inventory help
I found an article about this on the Internet, which says it is troublesome to change the registry and use CreateProcess.
I found this method and shared it.
Oh, you can also run the batch processing command without GUI as follows:
"D:/program files/ansys inc/v90/ANSYS/bin/Intel/ansys90.exe"-B-I E:/awxfansys/T1-A1-C1/500-2_up.mac-o E: // awxfansys/T1-A1-C1/111.mac