Lets do more with 3D Models

Approaches to automatically do things with SimLab Composer

In this article, we categorize the methods of automation for doing things with SimLab Composer into two groups that are involved in accelerating tasks and processes for getting work done faster, smarter, and more efficiently:

  1. GUI-based Methods
  2. Command-line-based Methods
Note: Before going further with reading, we would like to inform the reader of this article that he/she can try and test any of the presented topics by having SimLab Composer. The user can download SimLab Composer and evaluate all of its features for 21-days as a trial. Start the download now from here.

[1] GUI-based Methods

The methods of this category require user intervention by operating dialogs and GUI elements; though, they do not require any scripting or programming skills.

Acceleration MethodsPurposeExtensibility by ScriptsWindowsmacOSRequired License
SimLab CADVRterFile conversionMechanical
The Scripts Library of SimLab ComposerGeneralUltimate
SimLab Visual ScriptingGeneralUltimate
Table 1: Summarized comparison among GUI-based methods for task acceleration.

SimLab CADVRter

Screenshot 1: The Optional Processing tab of the settings of SimLab CADVRter.

SimLab CADVRter is an application created in the first place to convert any supported file format individually (single file at a time) or collectively (multiple files at a time) to any supported file format in one shot, besides its ability to convert most of the CAD files to VR-ready walkthroughs possible to be exhibited on regular monitors and VR headsets.

SimLab CADVRter comes by default with SimLab Composer, where the user can have it installed after the installation process of SimLab Composer is completed. The user can access the application from the desktop shortcut created by the installer of SimLab Composer, or alternatively from the installation directory of SimLab Composer, where it can be usually found in the following directory path:

C:\Program Files\SimLab\SimLab Composer 10\SimLabCADConverter.exe

SimLab CADVRter has also the capability to perform optional processing against the file(s) to be converted, which are set in the Optional Processing tab of its settings window, by:

  • Applying automatic replace rules defined in some *.simlabrr file. The replace rules file can be created using the Replace Rules tool found under the File menu of SimLab Composer.
  • Running customized scripts written by the user in Python (*.py), JavaScript (*.js)^, or SimLab Visual Scripting files (*.simlabvs).

^ JavaScript is deprecated since version 11.0 of SimLab Composer.

The Scripts Library of SimLab Composer

Screenshot 2: The Automation workbench of SimLab Composer, where Edit Script window and the Scripts Library are shown.

The Scripts Library of SimLab Composer contains pre-written scripts that are intended to be executed on the scene with a given ability to edit their lines and build upon them in order to alter or expand any functionality to match any need.

The Automation workbench of SimLab Composer provides a place for the user to create, load, save, edit, debug*, and run scripts in Python or JavaScript** right inside the application itself.

* Limited to JavaScript in version 10 and earlier versions of SimLab Composer.
** JavaScript is deprecated since version 11.0 of SimLab Composer.

The scripts of the library can be executed by simply doing one of the following actions:

  • Drag a script from the library and drop it into the scene
  • Double-click the desired script in the library
  • Hit the Run button existed at the bottom of the Edit Script dialog

SimLab Visual Scripting of SimLab Composer

Screenshot 3: SimLab Visual Scripting window appears in the Automation workbench of SimLab Composer.

SimLab Visual Scripting is the easiest and the common-sense way to go in scripting, no need to have scripting knowledge or experience; what the user has to do is to add nodes to a graph and to start connecting them together according to a specific logic and by determining a certain order of execution.

SimLab Visual Scripting is supposed to provide all the functionalities available by SimLab API but in a visual form.

[2] Command-line-based Methods

Figure 1: The CMD prompt of Microsoft Windows.

This category is used to professionally automate work on a daily-basis by advanced users, companies, or even servers, where they can be set to automatically trigger certain tasks at certain conditions.

These methods allow the user to run command(s) directly against the executable of SimLab Composer application without the need to deal with GUI elements. The commands can be run solely in CLI (for instance, CMD on Microsoft Windows and Terminal on macOS), or in batch files.

Automation MethodsPurposeCommandMicrosoftmacOSRequired License
SimLab Composer (w/o scripting)*File conversion only-ieUltimate
SimLab Composer (w/ scripting)**General-py, -js***Ultimate
SimLab Composer (w/ visual scripting)General-flUltimate
Table 2: Summarized comparison among Command-line-based methods for automation.

* w/o stands for the word (without).
** w/ stands for the word (with).
*** The command -js is deprecated since version 11.0 of SimLab Composer.

SimLab Composer without Scripting

The –ie command represents the way of using SimLab Composer without scripting in command-line mode. The command is used to import a supported file format/extension in SimLab Composer, and then export it to a supported file format/extension.

Command Syntax on Microsoft Windows

SimLabComposer.exe {-ie <import_file> <export_file>}

Command Syntax on Apple macOS

SimLabComposer {-ie <import_file> <export_file>}

or

open "SimLab Composer 10.app" --args {-ie <import_file> <export_file>}

Command Example on Microsoft Windows

“C:\Program Files\SimLab\SimLab Composer 10\SimLabComposer.exe” –ie C:\input_folder\input_file_name.obj C:\output_folder\output_file_name.pdf

Command Example on Apple macOS

“/Applications/SimLab Composer 10.app/Contents/MacOS/SimLabComposer" –ie /Users/JohnDoe/Desktop/input_folder/input_file_name.obj /Users/JohnDoe/Desktop/output_folder/output_file_name.pdf

or

open "/Applications/SimLab Composer 10.app/" --args –ie /Users/JohnDoe/Desktop/input_folder/input_file_name.obj /Users/JohnDoe/Desktop/output_folder/output_file_name.pdf

Also, the -ie command has the ability to import multiple input files, and then exporting them combined in one single output file.

Command Syntax on Microsoft Windows

SimLabComposer.exe { -ie <inputFilePath1> [ <inputFilePath2> <inputFilePath3> … ] <outputFilePath> } [ {-scale <number>} ]

Command Syntax on Apple macOS

SimLabComposer { -ie <inputFilePath1> [ <inputFilePath2> <inputFilePath3> … ] <outputFilePath> } [ {-scale <number>} ]

or

open "SimLab Composer 10.app" --args { -ie <inputFilePath1> [ <inputFilePath2> <inputFilePath3> … ] <outputFilePath> } [ {-scale <number>} ]

Command Example on Microsoft Windows

“C:\Program Files\SimLab\SimLab Composer 10\SimLabComposer.exe” –ie "C:\input_folder\input_file_name_1.obj" "C:\input_folder\input_file_name_2.skp" "C:\output_folder\output_file_name.gltf" -scale 2.0

Command Syntax on Apple macOS

“/Applications/SimLab Composer 10.app/Contents/MacOS/SimLabComposer" –ie "/Users/JohnDoe/Desktop/input_folder/input_file_name_1.obj" "/Users/JohnDoe/Desktop/input_folder/input_file_name_2.skp" "/Users/JohnDoe/Desktop/output_folder/output_file_name.gltf" -scale 2.0

or

open "/Applications/SimLab Composer 10.app/" --args –ie "/Users/JohnDoe/Desktop/input_folder/input_file_name_1.obj" "/Users/JohnDoe/Desktop/input_folder/input_file_name_2.skp" "/Users/JohnDoe/Desktop/output_folder/output_file_name.gltf" -scale 2.0

SimLab Composer with scripting

The –py and –js commands represent ways of using SimLab Composer with scripting capability in command-line mode. The commands are used to perform any scripted functionality.

Command Syntax on Microsoft Windows without script-based arguments:

SimLabComposer.exe {-py <python_file>}

Command Syntax on Microsoft Windows with script-based arguments:

SimLabComposer.exe {-py <python_file>} [ {-key1 <value1>} {-key2 <value2>} … ]

Command Syntax on Apple macOS without script-based arguments:

SimLabComposer {-py <python_file>}

or

open "SimLab Composer 10.app" --args {-py <python_file>}

Command Syntax on Apple macOS with script-based arguments:

SimLabComposer {-py <python_file>} [ {-key1 <value1>} {-key2 <value2>} … ]

or

open "SimLab Composer 10.app" --args {-py <python_file>} [ {-key1 <value1>} {-key2 <value2>} … ]

Command Example on Microsoft Windows:

“C:\Program Files\SimLab\SimLab Composer 10\SimLabComposer.exe” –py C:\python_scripts\python.py -i C:\input_folder\input_file_name.obj –o C:\output_folder\output_file_name.pdf

Command Example on Apple macOS:

“/Applications/SimLab Composer 10.app/Contents/MacOS/SimLabComposer" –py /Users/JohnDoe/Desktop/scripts_folder/python_file_name.obj –i /Users/JohnDoe/Desktop/input_folder/input_file_name.obj –o /Users/JohnDoe/Desktop/output_folder/output_file_name.pdf

or

open "/Applications/SimLab Composer 10.app/" --args –py /Users/JohnDoe/Desktop/scripts_folder/python_file_name.obj –i /Users/JohnDoe/Desktop/input_folder/input_file_name.obj –o /Users/JohnDoe/Desktop/output_folder/output_file_name.pdf

SimLab Composer with SimLab Visual Scripting

The –fl command represents the way of using SimLab Composer with visual scripting in command-line mode. The command is used to execute flows of SimLab Visual Scripting.

Command Syntax on Microsoft Windows without script-based arguments:

SimLabComposer.exe {-fl <flow_file>}

Command Syntax on Microsoft Windows with script-based arguments:

SimLabComposer.exe {-fl <flow_file>} [ {-key1 <value1>} {-key2 <value2>} … ]

Command Syntax on Apple macOS without script-based arguments

SimLabComposer {-fl <flow_file>}

or

open "SimLab Composer 10.app" --args {-fl <flow_file>}

Command Syntax on Apple macOS with script-based arguments

SimLabComposer {-fl <flow_file>} [ {-key1 <value1>} {-key2 <value2>} ]

or

open "SimLab Composer 10.app" --args {-fl <flow_file>} [ {-key1 <value1>} {-key2 <value2>} ]

Command Example on Microsoft Windows

“C:\Program Files\SimLab\SimLab Composer 10\SimLabComposer.exe” –fl C:\flows_folder\flow_file_name.simlabvs –i C:\input_folder\input_file_name.obj –o C:\output_folder\output_file_name.pdf

Command Example on Apple macOS

“/Applications/SimLab Composer 10.app/Contents/MacOS/SimLabComposer" –fl /Users/JohnDoe/Desktop/flows_folder/flow_file_name.simlabvs –i /Users/JohnDoe/Desktop/input_folder/input_file_name.obj –o /Users/JohnDoe/Desktop/output_folder/output_file_name.pdf

or

open "/Applications/SimLab Composer 10.app/" --args – fl /Users/JohnDoe/Desktop/flows_folder/flow_file_name.simlabvs –i /Users/JohnDoe/Desktop/input_folder/input_file_name.obj –o /Users/JohnDoe/Desktop/output_folder/output_file_name.pdf

Conclusion

In the end, what determines the way of how to go with automating things is the nature of the user’s need.


Leave a Reply

Your email address will not be published. Required fields are marked *