Delegation of Commands

This tutorial will introduce you to naming of running instances of RealityCapture, delegating commands into one of them, pausing, aborting and checking processes via the command-line interface.

Instance Naming

RealityCapture allows you to open up to 4 instances at once. This means that you can have 4 projects open in RealityCapture at the same time.
When using the command-line interface, you can name individual instances and then delegate commands into an already opened instance – with the use of the command setInstanceName with a parameter instanceName. The name of the instance cannot contain spaces.

EXAMPLE - the following will set the name of the instance to RC1:

RealityCapture.exe -setInstanceName RC1

Delegation of Commands

You can delegate a command or a sequence of commands to an already opened instance of RealityCapture using the command delegateTo with these 2 parameters: instanceName and commandsDefinition. Instead of instanceName, you can use the star symbol (*). In this case, the command is delegated to the first instance found.

EXAMPLE 1 - to add an image to the first, already opened instance of RealityCapture, write:

RealityCapture.exe -delegateTo * -add D:\\datasets\\test\\img001.JPG

EXAMPLE 2 - for adding an image to the instance of RealityCapture named RC1, use:

RealityCapture.exe -delegateTo RC1 -add D:\\datasets\\test\\img001.JPG

EXAMPLE 3 - this adds every fifth image from a specified folder, aligns the images, saves the project and quits the app:

start RealityCapture.exe
TIMEOUT 2
for /l %%A in (1,5,100) do (
RealityCapture.exe -delegateTo * -add D:\\datasets\\test\\img%%A.JPG
)
RealityCapture.exe -delegateTo * -align
RealityCapture.exe -delegateTo * -save d:\\datasets\\test\\processed\\scene.rcproj
RealityCapture.exe -delegateTo * -quit

Waiting for Completion

There is also the command waitCompleted for pausing the execution of other commands until the current process is finished. When using this command along with the parameter instanceName (or the * symbol), the following commands are executed only once the process is finished in the instance that the command is referring to. See the example below.

EXAMPLE - run alignment in the first instance found, wait with the batch execution until the alignment process is finished and then check the result of the process:

...
RealityCapture.exe -delegateTo * -align
RealityCapture.exe -waitCompleted *
call CheckResult
...

Checking Instance Status

Use the command getStatus along with instanceName (or an asterisk "*") to return the progress of a running instance.

EXAMPLE - retrieves the current status from an already opened instance RC1:

RealityCapture.exe -getStatus RC1

RESULT - in the console of that specific instance, you will get the result in the form of the progress ID, progress percentage of the current process, elapsed time, and estimated time:

id:0x10001 progress:57.5% runtime:4.26sec endEstimation:3.40sec

You can also print the result of getStatus to an external text file. The command would look as such:

RealityCapture.exe -getStatus * > D:\statusreport.txt

Controlling Process

You can use commands pauseInstance, unpauseInstance, and abortInstance along with the parameter instanceName (or a * symbol) to control the currently running processes inside of an opened instance of RealityCapture. This is beneficial mainly when processing on servers or render farms. These commands allow you to pause a current process in case there is a need to run the process with a higher priority. Afterwards, you can again unpause the previous process, when needed. Alternatively, you can abort the process completely.

EXAMPLE - pause a process running in the instance RC1:

RealityCapture.exe -pauseInstance RC1

Project and Image Commands

Manage the current project, the application itself and add images via CLI

Commands Outside Command Prompt

Using CLI with an .rccmd file

Continue

Commands for alignment and component handling

Reconstruction Commands

Model calculation via the command line

Model Tools' Commands

Further model processing via the command line

Settings' Commands

Application settings and behaviour

Error Handling Commands

Commands for handling potential errors

See also: