dos
Executes a dos command on Windows.
Syntax
R1 = dos(stringCommand)
[R1, R2] = dos(stringCommand)
Inputs
- stringCommand
- Command to be executed
Outputs
- R1
- The status of the dos command executed
- R2
- Optional output which contains any text echoed to standard output when the system command is executed.
Examples
R = dos('echo %date% %time%')
R = 0
[R1, R2] = dos('echo %date% %time%')
R1 = 0
R2 = Fri 02/09/2018 12:24:58.52
Comments
It is necessary to set the ALTAIR_HOME variable to empty before calling any Altair product from inside Compose. To do this, append "set ALTAIR_HOME=&" to the string command to be executed in the system function.
"C:/Program Files/Altair/2021/hwsolvers/scripts/motionsolve.bat" solverdeck.xml
system('set ALTAIR_HOME=&"C:/Program Files/Altair/2021/hwsolvers/scripts/motionsolve.bat" solverdeck.xml');