Batch File Examples
This page introduces the .bat file and provides useful command lines and an example for batch simulation using the recorder.
A Batch (.bat) file is a text file created with a text editor. This file contains a series of instructions with a precise goal for application, for example running recording simulation in batch with Ansys AVxcelerate Asset Preparation. These instructions are executed through the command line interpreter.
Useful Command Lines
|
Name |
Type |
Usage /Syntax |
Function |
|
ProjectPath |
VRXPERIENCE.Editor.exe "pathofthevrxperienceprojec\nameoftheproject.vrxperience" |
Provide the path of the .vrxperience project. |
|
|
LaunchRecord |
boolean |
-r |
Launch the application only for the recorder module. |
|
RecordCamera |
string |
--recordcamera CameraName |
Define which camera to record with. |
|
RecordRendering |
string |
--recordrendering RenderingEngine |
Define which rendering type to record with. It can be either Shadics or progressive. |
|
RecordTimeline |
string |
--recordtimeline TimelineName |
Define which timeline to record. |
|
RecordFrames |
unsigned integer |
--recordframes nbFrames |
Define how many frames to record. |
|
RecordFramerate |
unsigned integer |
--recordframerate frameRate |
Define the frame rate of the record. |
|
RecordFrametime |
unsigned integer |
--recordframetime frameTime |
Define the desired time for frame creation in seconds, only applicable with the progressive Rendering Engine. |
RecordWidth |
unsigned integer |
--recordwidth width |
Define the desired width for frame expressed in pixels. |
RecordHeight |
unsigned integer |
--recordheight height |
Define the desired height for frame expressed in pixels. |
Example for Batch Simulation with the Recorder
This example of batch file allows you to launch several simulations using the same *.vrxperience project but switching between different combinations of timelines and cameras:
rem Command 1VRXPERIENCE.Editor.exe "pathofthevrxperienceproject\nameoftheproject.vrxperience" -r --recordcamera mycameraname1 --recordtimeline mytimelinename1 --recordframes numberofframe --recordframerate numberofimagespersecond --recordrendering renderingenginename
pause
rem Command 2 is launched after the VRXPERIENCE is closed automaticallyVRXPERIENCE.Editor.exe "Pathofmyvrxperienceproject\nameoftheproject.vrxperience" -r --recordcamera mycameraname1 --recordtimeline mytimelinename2 --recordframes numberofframe --recordframerate numberofimagespersecond --recordrendering renderingenginename
pause
rem Command 3 is launched after the VRXPERIENCE is closed automaticallyVRXPERIENCE.Editor.exe "Pathofmyvrxperienceproject\nameoftheproject.vrxperience" -r --recordcamera mycameraname2 --recordtimeline mytimelinename1 --recordframes numberofframe --recordframerate numberofimagespersecond --recordrendering renderingenginename
pause
rem Command 4 is launched after the VRXPERIENCE is closed automaticallyVRXPERIENCE.Editor.exe "Pathofmyvrxperienceproject\nameoftheproject.vrxperience" -r --recordcamera mycameraname2 --recordtimeline mytimelinename2 --recordframes numberofframe --recordframerate numberofimagespersecond --recordrendering renderingenginename
pause