CLI: Name all components generated from an Alignment.



  • Avatar
    Wallace Wainhouse CR


    instead of pressing the align button you could run a .bat like this:

    @ echo off

    set app="C:\Program Files\Capturing Reality\RealityCapture\RealityCapture.exe"

    set /p compName=[what would you like to call the component?]

    set /a totalLoops=40

    set /a nameCount=0

    %app% -delegateTo * -align


    %app% -delegateTo * -selectComponent "Component %nameCount%" -renameSelectedComponent "%compName% %nameCount%"

    set /a nameCount+=1

    if %nameCount%==%totalLoops% goto end

    goto nameloop


    Just try to make sure you only have 1 instance of RC running and ready to align. You can then name the set of components from each alignment as you wish. If you think your dataset is likely to produce more than 39 components just increase the variable "totalLoops".

    Bare in mind this script should run with errors as it is by design meant to search for more components than are created, but it should do the intended job beforehand.

    There is almost certainly a more elegant way of doing this, but this should do the job.

    Comment actions Permalink
  • Avatar

    That's an interesting approach - but agreed, it would be nice if there was a more elegant solution that didn't produce errors.

    Maybe if there's a way to query how many components there are after an alignment?

    That way we could run the loop the correct amount of times, so no error would be produced.

    Comment actions Permalink

Please sign in to leave a comment.