This tutorial introduces how to name running instances of RealityScan, delegate commands to them, and control their processes (pause, resume, abort, or check status) using the command-line interface.
Instance Naming
RealityScan allows multiple instances to run simultaneously. To open them, use the executable file located in the installation folder.
When working through the CLI, you can assign a name to each instance using the -setInstanceName command with the parameter instanceName. The instance name cannot contain spaces.
Example – set the instance name to RS1:
RealityScan.exe -setInstanceName RS1Delegation of Commands
You can delegate a single command or a sequence of commands to an already opened instance of RealityScan using the -delegateTo command with two parameters:
instanceName
commandsDefinition
Instead of specifying the instance name, you can use the * symbol to delegate the command to the first active instance found.
Example 1 – add an image to the first opened instance of RealityScan:
RealityScan.exe -delegateTo * -add D:\\datasets\\test\\img001.JPGExample 2 – add an image to the instance named RS1:
RealityScan.exe -delegateTo RS1 -add D:\\datasets\\test\\img001.JPGExample 3 – add every fifth image from a folder, align them, save the project, and quit the application:
start RealityScan.exe
TIMEOUT 2
for /l %%A in (1,5,100) do (
RealityScan.exe -delegateTo * -add D:\\datasets\\test\\img%%A.JPG
)
RealityScan.exe -delegateTo * -align
RealityScan.exe -delegateTo * -save d:\\datasets\\test\\processed\\scene.rsproj
RealityScan.exe -delegateTo * -quitWaiting for Completion
The -waitCompleted command pauses script execution until the current process in the specified instance is finished. When used with instanceName or the asterisk (*) symbol, subsequent commands will run only after the referenced process has completed.
Example – run alignment in the first instance, wait for it to finish, then check the result:
...
RealityScan.exe -delegateTo * -align
RealityScan.exe -waitCompleted *
call CheckResult
...Checking Instance Status
Use the -getStatus command with instanceName (or *) to display the progress of a running instance.
Example – retrieve the current status from instance RS1:
RealityScan.exe -getStatus RS1Result:
id:0x10001 progress:57.5% runtime:4.26sec endEstimation:3.40secYou can also redirect the output of -getStatus to a text file:
RealityScan.exe -getStatus * > D:\statusreport.txtControlling Processes
You can manage running processes in an opened instance using the following commands:
-pauseInstance
-unpauseInstance
-abortInstance
Each accepts the parameter instanceName (or *).
These commands are especially useful when working on servers or render farms, allowing you to pause a process to prioritize another, resume it later, or terminate it completely.
Example – pause a process running in instance RS1:
RealityScan.exe -pauseInstance RS1