CLI notification



  • Avatar
    Matej Kuric


    you can find all Command Line commands in the help in RC under ''All CLI Commands''.

    The command to export a report is -exportReport .

    I'll give you an example.

    -exportReport C:\Users\overviewreport.html Reports\Overview.html

    First parameter is a path where you want to save your report together with its name.
    Secon parameter is a report template, which can be found in RC folder in your computer. Just make sure to choose the right template.


    Comment actions Permalink
  • Avatar
    Afshin Vasei

    thank you for your help

    what i meant is notifying the CLI about the progress in a real-time manner.

    e.g. getting notified as soon as the 3d reconstruction is complete.

    Comment actions Permalink
  • Avatar
    Matej Kuric

    It is possible to change Progress End Notification settings in RC. You can set up the RC to create a sound after finishing a process or to call an external program or piece of code (i.e. to write your process into an external text document). You can find more in In-App help in the section Application Settings / Progress End Notification and the setting can be found in Workflow tab / Application / Settings.

    There is also a CLI command ''writeProgress'' which writes progress into an external document.

    Comment actions Permalink
  • Avatar
    Erik Kubiňan CR
    1. How to set Progress end notification

    You don’t have to check the progress bar every time, to know that the computation is done. You can tell RC to notify you by playing a sound or writing the process result into a file. You can define it in the Application settings, section “Progress end notification”.


    A very simple example is to write executed file ‘my_file.bat’ like this:

    echo Process %1 has finished with result code %2 in %3 seconds. > %4

    And then in the “Command-line process” call the ‘my_file.bat’ file with parameters:

    C:\\Users\\zuduri\\Desktop\\my_file.bat $(processId) $(processResult) $(processDuration:d) C:\\Users\\zuduri\\Desktop\\my_results.txt

    Note: Use your own paths for the files.


    Results will be written into the file ‘my_results.txt’. If the process finishes correctly, processResult will be 0. You can also adjust executed file to write result only for the processes finished with an error.

    You can find more info in the Help, section “Application settings”.

    E-mail notification

    Simple example: How to send an email from Gmail after process is finished either with „success“ or „error“.


    Create file ‚my_file.bat‘ like this (in the first line enter the path to your files):

    cd C:\Users\user\Desktop\

    if /i "%1"  NEQ "0" (

    PowerShell.exe -ExecutionPolicy Bypass -file ".\email.ps1" -argument "ERROR"

    ) else (

    PowerShell.exe -ExecutionPolicy Bypass -file ".\email.ps1" -argument "SUCCESS"



    Create file ‚email.ps1‘ like this (change your credentials):


    $EmailFrom = ""

    $EmailTo = ""

    $Subject = "RealityCapture process"

    $Body = ("Computation finished with result:",$argument)

    $SMTPServer = ""

    $SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 587)

    $SMTPClient.EnableSsl = $true

    $SMTPClient.Credentials = New-Object System.Net.NetworkCredential("username", "password");

    $SMTPClient.Send($EmailFrom, $EmailTo, $Subject, $Body)


    In the Application settings, section Progress end notification - Command line process call the ‘my_file.bat’ like this (change to your path):


    C:\Users\user\Desktop\my_file.bat $(processResult)


    NOTE: You might need to change your Gmail settings allowing less secure apps to access your account.


    Alternatively, you can add more parameters to the message such as process ID or process duration. 


    Comment actions Permalink
  • Avatar
    Erik Kubiňan CR

    This has been a part of the Friday tips on Capturing Reality Arena. It may not be too easy but could be a solution for you.

    Comment actions Permalink

Please sign in to leave a comment.