RealityCapture enables you to run commands even without the direct use of the command line. You can do so very simply with drag-and-dropping a text file, which includes a sequence of supported commands of your choice, saved with an .rccmd extension, into the application.
This is an example of one command sequence that may be written inside the .rccmd file, used for loading images stored in the folder C:\MyFolder\Images\, aligning all the loaded pictures, creating a model in normal detail, and saving the project to C:\MyFolder\MyProject.rcproj:
You can either write all commands in a row (like above) or write each one in a new/separate line, which helps making the code better visually structured, like this:
You may also use the ^ sign to break a line (with or without a space before ^):
You can use command execRCCMD to execute all commands listed in the specified .rccmd file. Required parameter for execRCCMD command is the full file and pathname for the .rccmd file. You can use execRCCMD command in the Windows command line, in your .bat file or inside another .rccmd file (see example below).
When using a command execRCCMD to execute the .rccmd file, you can pass up to 10 arguments - the first argument and path to the executed file is required. In order to use the arguments inside the .rccmd file, use $(arg0) $(arg1) ... $(arg9). Below is an example of using sample.bat
file to open RealityCapture and calling addFolder.rccmd that adds images from the folder "D:\MyFolder\Images" into the application. "D:\MyFolder\Images" is the only argument passed to addFolder.rccmd.
File sample.bat file contains:
File addFolder.rccmd contains:
When using RealityCapture command or executing a .rccmd file, you can use basic predefined RealityCapture functions and variables. The same functions and variables can be used when exporting "Reports".
You can find the instructions on how to use them as well as the list of available functions and variables, here in the section Reports - Basic functions.
Below you can find the commands inside the .rccmd. Once you drag and drop the .rccmd into the application, the following actions are performed:
Example:
Additionally, you can use these global variables:
$(appRootDir) - path to the installation folder of the RealityCapture application. Most often it is C:\Program Files\Capturing Reality\RealityCapture.
$(appStartDir) - path to the folder from which the RealityCapture.exe was executed (e.g. the path to the .bat file that calls RealityCapture.exe).
$(cmdStartDir) - path to the folder in which the executed .rccmd file is located.
$(arg1), ..., $(arg9) - variables passed to execRCCMD command.
Manage the current project, the application itself and add images via CLI
On delegating commands into an opened instance of RealityCapture
Commands for alignment and component handling
Model calculation via the command line
Further model processing via the command line
Application settings and behaviour
Commands for handling potential errors