To start the Command Line Interface (CLI), double click the executable BimSens.Api.Automation.exe located in BimSens installation folder (by default C:\Program Files (x86)\BimSens), or click this sample link bimsens:// and authorise your web browser to launch the app.


 VERSION 3.1 MINIMUM


The Automation Command Line Interface is available starting from BimSens 3.1. If your web browser raises an exception you may need to update the app.


When launched without any command, the CLI prompts to run in one of 2 modes:

  • The Friendly Mode, using the Command Designer dialogue to build commands including a Project browser to identify resources in existing Projects
  • The Console Mode, that simply launches the usual console. In Console Mode, the CLI runs an interactive tutorial by default, including command syntax description, list of commands and a couple examples

Using the Command Designer

In Friendly Mode, the CLI launches the Command Designer to assist with assembling and testing automation pipelines.

The Designer has 3 sections:

  • The Viewer selection to nominate which BimSens Viewer to use to run the command, e.g. Navisworks Simulate 2022
  • The Commands builder, to build the list of commands to execute sequentially, including setting arguments/options values
  • The Output preview, to visualise the resulting command(s) in CommandLine or URL mode, try, or export the result

Viewer Selection

  • Select a Viewer from the list of illegible Viewers, then pick a Feature set and Version.

When you cannot know ahead of time which Viewer will be on the machine that will run the commands, or when distributing to multiple users that can have different Viewers on their machines, use the Min/Max tags for the Feature set, and Latest for the Version. The CLI will launch the Viewer best matching the criteria on the executing computer.

While selecting options from the menus the CLI checks for a valid Viewer matching the criteria on the current machine.

Building Commands

Once a valid Viewer is selected, commands can be added to the pipeline.

  • Click the Command button to select from the list of known commands, or click the row Add Command... and type the command name directly.

The most likely first command is to open an existing Project --project or create a new one --project-new, then followed by browsing to a DataSource --source, activating a DataView --activate etc.

When the command is a known command, the details pane will display Information about the command purpose, the name and description of the Value as well as if it is required or optional, and a preset list of possible arguments to add with their own description, requirement and example value. Values and Arguments marked with a red asterix (*) are mandatory.

When an expected value is a file path, file(s) can be dragged and dropped onto the field to set its value.


To facilitate the assignment of valid argument values, the Project Browser lets you open an existing Project and browse to the command to run.

  • To open the Project Browser, click the From Project... button, and select a Project file. The Project Browser displays the content of the Project as the usual Projects Tree, adding nodes for Colour Filter, Data Transfer, Bookmarks etc.
  • Select a node in the tree, to display the available command(s) to run on that node
  • Use the Next and Previous buttons to run through the commands if multiple are available
  • Click the Add button to add the selected command to the pipeline, with preset argument values


 INCLUDE ALL STEPS


The CLI will do its best to use sensible default values when they are not provided, I.e. one can build the command:

--project "path" --filter...

and the CLI will assume to use the first DataSource in the Project, then the first DataView in the DataSource, but this may produce inconsistent results when the Project changes.

It is thus recommended to include all navigation steps:

--project "path" --source guid --activate guid --filter...

The Project Browser dialogue can assist selecting the right values

Running the Commands

  • From the Output section, select the output Format between:
    • CommandLine to create a batch file (.bat) that can be run with a double click
    • URL to create a url link that can be embedded in emails, website, and shared with other BimSens users to trigger the command on their machine
  • Click the Try button to run the command directly
  • Click the Copy button to copy the text to the clipboard,
  • Click the Save As... button to save the commands to a file