Solibri API - Solibri Autorun Examples
The Solibri Autorun packages includes three XML files, which represent three different use cases. You can use these for practising the use of Solibri Autorun. The example use cases use sample resources included in the Solibri Office install package, but please ensure that the file paths are correct. You can also edit the files if you wish to use other resources.
Example 1
This XML file includes the tasks to:
- Open an SMC model.
- Update the IFC model files included in the SMC model.
- 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"/>
<updatemodel
file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Ground_Floor_Vent.ifc"
with="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\Ground_Floor_Vent.ifc"/>
<updatemodel
file="C:\Users\Public\Solibri\SOLIBRI\Samples\ifc\First_Floor_Vent.ifc"
with="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 file.
- 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" />
<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 3
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.
- 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.bcfzip
version="2" />
<savemodel
file="C:\Users\Public\Solibri\SOLIBRI\Samples\models\Solibri model.smc" />
<exit />
</target>
</batch>