Solibri API - Getting Started with Solibri Autorun

Solibri Autorun is an extension in Solibri Advanced, Premium, and Security+ for automating routine tasks. Solibri Office licenses also support Autorun. You define workflows—such as updating models, creating model categories, running checks, exporting issues as BCF files, creating presentations, running information takeoff (ITO), and creating ITO reports—in an XML file. Pass that file to Solibri as a command-line argument or schedule it as a task. For example, you can run daily model checking overnight and focus on issue handling and quality coordination during the day.

Autorun batch files are plain XML documents. Each task is an XML element with attributes for file paths and options. You can edit them in any text editor, such as Notepad or Notepad++.

Autorun needs paths to the files it should open and where it should write reports. If your cloud service syncs a shared folder to disk, point Autorun at that folder.

Solibri Autorun Examples

Six use cases are explained below. The same examples and XML files are available in autorun-example-usecases.zip. Use them to practise Autorun, and update the file paths to match your environment.

Example 1

This XML file includes the tasks to:

  1. Open an SMC model.
  2. Update the IFC model files included in the SMC model.
  3. Update the IFC model file if it is outdated and autoupdate is true.
  4. Save the updated SMC model with the same name.
  5. Exit Solibri.
<?xml version="1.0" encoding="ISO-8859-1"?>
<batch name="Simple Batch" default="root">
<!-- This is the starting task -->
<target name="root">

<openmodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<updatemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Solibri building.ifc"
    with="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Solibri building.ifc"/>

<updatemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Solibri Building Structural.ifc"
    with="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Solibri Building Structural.ifc"
    autoupdate= "true"/>

<updatemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Ground_Floor_Vent.ifc"
    autoupdate= "true"/>

<updatemodel file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\First_Floor_Vent.ifc" />

<updatemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Second_Floor_Vent.ifc"
    with="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Second_Floor_Vent.ifc"/>

<savemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<exit />
</target>
</batch>

Example 2

This XML file includes the tasks to:

  1. Open an IFC model.
  2. Create model categories.
  3. Save as SMC model.
  4. Exit Solibri.
<?xml version="1.0" encoding="ISO-8859-1"?>
<batch name="Simple Batch" default="root">
<!-- This is the starting task -->
<target name="root">

<openmodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Solibri building.ifc"> 
    <category>CATEGORY_NAME1</category>
    <category>CATEGORY_NAME2</category> 
</openmodel>

<savemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<exit />

</target>
</batch>

Example 3

This XML file includes the tasks to:

  1. Open an IFC file.
  2. Update all IFC model files that are outdated.
  3. Open a classification.
  4. Open a ruleset.
  5. Check the model.
  6. Add issue slides with a description and a snapshot zoomed to the relevant component.
  7. Create a presentation from the slides created.
  8. Create a BCF report from the Presentation view.
  9. Save the model as an SMC file.
  10. Close Solibri.
<?xml version="1.0" encoding="ISO-8859-1"?>
<batch name="Simple Batch" default="root">
<!-- This is the starting task -->
<target name="root">

<openmodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Solibri building.ifc" />
    
<autoupdatemodels/>

<openclassification
    file="C:\Users\Public\Solibri\SOLIBRI\Classifications\Building Elements - General.classification"/>

<openruleset
    file="C:\Users\Public\Solibri\SOLIBRI\Rulesets\Architectural Rules\BIM Validation - Architectural.cset"/>

<check />

<autocomment zoom="TRUE" />

<createpresentation />

<bcfreport
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\reports\Found issues.bcfzip" version="2" />

<savemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<exit />

</target>
</batch>

Example 4

This XML file includes the tasks to:

  1. Open an SMC model.
  2. Update an IFC file included in the SMC model.
  3. Check the updated model.
  4. Add issue slides with a description and a snapshot zoomed to the relevant component.
  5. Update a previously created presentation with the new checking results.
  6. Create a BCF report from the Presentation view (BCF version 2.1 uses a .bcf file).
  7. Save the SMC model.
  8. Close Solibri.
Important 5. Update a previously created presentation with the new checking results.
If you need to retain issues that are resolved from the checking results in your presentations then please do not use the updatepresentation command in your XML files, instead update these presentations manually.
<?xml version="1.0" encoding="ISO-8859-1"?>
<batch name="Simple Batch" default="root">
<!-- This is the starting task -->
<target name="root">

<openmodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<updatemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Solibri Building.ifc"
    with="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Solibri Building - modified.ifc"/>

<check />

<autocomment zoom="TRUE" />

<updatepresentation />

<bcfreport
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\reports\Found issues.bcf"
    version="2.1" />

<savemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<exit />

</target>
</batch>

Example 5

This XML file includes the tasks to:

  1. Open an SMC model.
  2. Open an ITO file.
  3. Run a specific ITO.
  4. Create a plain ITO report.
  5. Save the model as an SMC file.
  6. Close Solibri.
<?xml version="1.0" encoding="ISO-8859-1"?>
<batch name="Simple Batch" default="root">
<!-- This is the starting task -->
<target name="root">

<openmodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<openito file="C:\Users\Public\Solibri\SOLIBRI\Information Takeoff\Spaces.ito" /> 

<takeoff name="Spaces" />

<itoreport name="Spaces" file="C:\Users\Public\Solibri\SOLIBRI\Samples\Spaces.xlsx" /> 

<savemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<exit />

</target>
</batch>

Example 6

This XML file includes the tasks to:

  1. Open an SMC model.
  2. Open an ITO file.
  3. Run all defined ITOs.
  4. Create ITO report using a template.
  5. Save the model as an SMC file.
  6. Close Solibri.
<?xml version="1.0" encoding="ISO-8859-1"?>
<batch name="Simple Batch" default="root">
<!-- This is the starting task -->
<target name="root">

<openmodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<openito file="C:\Users\Public\Solibri\SOLIBRI\Information Takeoff\Spaces.ito" /> 

<takeoff />

<itoreport file="C:\Users\Public\Solibri\SOLIBRI\Samples\Spaces.xlsx" reportTitle="Report" templatefile="C:\Users\Public\Solibri\SOLIBRI\Information Takeoff\Templates\Spaces.xls" /> 

<savemodel
    file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />

<exit />

</target>
</batch>