BlenderBIM Add-on Adding labels linked to properties and quantities

From Wiki.OSArch
Logo blenderbim.svg This page is BlenderBIM Add-on documentation. All articles in the OSArch wiki related to BlenderBIM Add-on can be seen in the BlenderBIM Add-on Category

Displaying data[edit]

Each element in a BIM model usually contains a lot of data. The data can obviously be accessed by using a dedicated BIM viewer or read directly by a machine, however, very often a simple graphical way is still necessary. BlenderBIM add-on uses a system of variables which can be linked to object properties or quantities and which then get dynamically replaced with the actual linked value on 2D view export.

The most common uses of this feature include:

  • room tags
  • door/window tags
  • fire ratings
  • staircase labels
  • element composition tags etc.

There is currently no way to see the actual value in the main Blender UI window.

Adding a text with a variable[edit]

For a text object to show a property value of an element, three conditions are necessary:

  • the text object has to be linked to the element
  • a variable name has to be declared in the text object and it must be linked to a property of the element
  • the variable name must be included the text object (in double curly brackets)

To add a variable text object, first simply create a new text with Add>Text and manually link it to an object - exit the edit mode, go to Object Data Properties > Text Paper space and pick an object in the Related Element field. To declare a variable, go to Object Data Properties > Text Paper space, click on "Add variable" and fill in the variable name. The variable must be now linked to an object property by filling in the Property Key field:

  • Attributes are referenced simply by name. Examples: PredefinedType, GlobalId, Name, Description, ObjectType, Tag
  • Properties are referenced by name, prefixed with Pset_Name. Examples: Pset_SpaceCommon.NetPlannedArea
  • Quantities are referenced by name, prefixed with Qto_Name. Examples: Qto_SpaceBaseQuantities.NetFloorArea
  • Custom properties (for example in parametric objects) are referenced by name. Examples:Width
  • Materials - Make sure to assign the material in 'IFC Object Material'. Examples: material.Name
    • 2020-12-08 16-25-49 blenderBlender (CUsersryanDocumentstesty.blend)blender.png

Lastly, to include the variable in the text, enter the edit mode again and type in the variable name in double curly brackets: {{variable_name}}.

An example of a tagged Ifc Element

Labeling multiple objects[edit]

A semi-automatic way to do this whole process is to select objects to be tagged and use the "N" panel > BlenderBIM > Annotation > Text - this creates a text object for every selected element and links it automatically. (Important: The texts are placed relative to the active Drawing camera, the command will fail if there is no drawing camera present!) Then select one of the created texts, add the desired variables and formatting, select the other texts again and use Object Data Properties > Text Paper space > Propagate Text Data to apply the same variables and formatting on all selected.

Adding multiple labels with BlenderBIM add-on (click on the image and open original file to see the animation)

The resulting 2D svg export with interpreted variables

Note that the default style of IfcSpace after export is no fill and no border, which makes it invisible and harder to select with the default Inkscape settings.

Calculations inside labels[edit]

The exporter interpreting the variable also evaluates python functions included in the Property key field. This enables for example simple calculations like rounding - round({{BaseQuantities.GrossFloorArea}},1), unit conversion, etc.