Solibri API - Getting Started with Solibri Autorun
Solibri Autorun is an extension to Solibri Office for automating routine tasks. With the extension, tasks such as updating models, creating model categories, running checks, exporting the found issues as BCF files, creating presentations, run ITOs and creating ITO reports are pre-defined in an XML file, which is given as a command line argument or scheduled task for Solibri to execute. As a result, you have your daily model checking done, for example, overnight, and you can focus on issue handling and quality coordination.
An XML file is an XML (Extensible Markup Language) data file. It is formatted much like an HTML document, but uses custom tags to define objects and the data within each object. XML files can be thought of as a text-based database. You can edit the XML files using any text editor, such as Notepad or Notepad++.
Solibri Autorun needs a local path to the files to open and where to create reports. If the cloud service has a shared folder, Solibri Autorun can be pointed to this folder and used with the cloud service.
Solibri Autorun Examples
Six different use cases are explained here and the same use cases guide and the example xml files can also be downloaded from here. You can use these for practising the use of Solibri Autorun, but please ensure that the file paths are correct.
Example 1
This XML file includes the tasks to:
- Open an SMC model.
- Update the IFC model files included in the SMC model.
- Update the IFC model file if it is out-dated and autoupdate is true.
- Save the updated SMC model with the same name.
- 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:
- Open an IFC model.
- Create model categories.
- Save as SMC model.
- 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:
- Open an IFC file.
- Update all IFC model files which are out-dated.
- Open a classification.
- Open a ruleset.
- Check the model.
- Add issue slides with a description and a snapshot zoomed to the relevant component.
- Create a presentation from the slides created.
- Create a BCF report from the Presentation view.
- Save the model as an SMC file.
- 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:
- Open an SMC model.
- Update an IFC file included in the SMC model.
- Check the updated model.
- Add issue slides with a description and a snapshot zoomed to the relevant component.
- Update a previously created presentation with the new checking results.
- Create a BCF report from the Presentation view. BCF report version 2.1 only supports .bcf files.
- Save the SMC model.
- Close Solibri.
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:
- Open an IFC file.
- Open an ITO file.
- Take off a specific ITO.
- Create a plain ITO report.
- Save the model as an SMC file.
- 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:
- Open an IFC file.
- Open an ITO file.
- Take off all defined ITOs.
- Create ITO report using a template.
- Save the model as an SMC file.
- 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>
Using Solibri Autorun with a Borrowed License
You can use Solibri Autorun with a borrowed license. Note that you need to have at least five days left of the license borrowing. Otherwise, a dialog stating “Borrowed license is going to expire in X days.” opens, and this prevents Solibri Autorun from starting.