Editing BlenderBIM Add-on Adding labels linked to properties and quantities

From Wiki.OSArch

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
{{BlenderBIM_Add-on_Documentation}}
 
{{BlenderBIM_Add-on_Documentation}}
 
==Displaying data==
 
==Displaying data==
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.
+
Each element in a BI model usually contains a lot of data. The data can obviously be accessed by using a dedicated BIM viewer or red 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:  
 
The most common uses of this feature include:  
 
*room tags
 
*room tags
 
*door/window tags
 
*door/window tags
*fire ratings
 
*staircase labels
 
 
*element composition tags etc.
 
*element composition tags etc.
  
Line 18: Line 16:
 
*the variable name must be included the text object (in double curly brackets)
 
*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 add a text object with a variable, first simply create a new text with Add>Text. and type in a variable name in said double curly brackets: <code>{{variable_name}}</code>. Then go to Object Data Properties > Text Paper space, click on "Add variable" and fill in the variable name (now without brackets).
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: <code><nowiki>{{PredefinedType}}</nowiki></code>, <code><nowiki>{{GlobalId}}</nowiki></code>, <code><nowiki>{{Name}}</nowiki></code>, <code><nowiki>{{Description}}</nowiki></code>, <code><nowiki>{{ObjectType}}</nowiki></code>, <code><nowiki>{{Tag}}</nowiki></code>
 
*Properties are referenced by name, prefixed with Pset_Name. Examples: <code><nowiki>{{Pset_SpaceCommon.NetPlannedArea}}</nowiki></code>
 
*Quantities are referenced by name, prefixed with Qto_Name. Examples: <code><nowiki>{{Qto_SpaceBaseQuantities.NetFloorArea}}</nowiki></code>
 
*Custom properties (for example in parametric objects) are referenced by name. Examples:<code><nowiki>{{Width}}</nowiki></code>
 
*Materials - Make sure to assign the material in 'IFC Object Material'.
 
**<code><nowiki>{{material.Name}}</nowiki></code>
 
**<code><nowiki>{{material.LayerSetName}}</nowiki></code>
 
**<code><nowiki>{{material.item.Material.Name}}</nowiki></code>
 
**<code><nowiki>{{material.MaterialLayers.Name}}</nowiki></code>
 
***other ways to say the same thing
 
****<code><nowiki>{{material.item.Name}}}</nowiki></code>
 
****<code><nowiki>{{"material"."item"."Name"}}</nowiki></code>
 
****<code><nowiki>{{r"material"."item"."Name"}}</nowiki></code>
 
****<code><nowiki>{{mat.i.Name}}</nowiki></code>
 
**You can use the double backtick command to run any types of custom evaluations
 
***<code><nowiki>``{{material.item.Material.Name}}[0]``</nowiki></code> gets the material name assigned to the 1st material layer
 
****This works too: <code><nowiki>{{material.item.Material.Name.0}}</nowiki></code>
 
***<code><nowiki>``round(sum({{mat.i.LayerThickness}}),2)``</nowiki></code> displays the total layer thickness rounded to 2 decimal points
 
***<code><nowiki>``{{r"Pset_.*Common"."Status"}}[0]``</nowiki></code> = EXISTING (for example)
 
****<code><nowiki>``{{r"Pset_.*Common"."Status"}}[0][:2]``</nowiki></code> = EX (for example)
 
***<code><nowiki>``int({{Qto_SpaceBaseQuantities.NetFloorArea}})`` SF</nowiki></code> = 350 SF (for example)
 
 
 
 
 
 
 
 
 
[[File:BlenderBIM IfcSpace Tag.JPG|thumb|600px|frame|center|An example of a tagged Ifc Element]]
 
 
 
==Labeling multiple objects==
 
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.
 
 
 
[[File:BlenderBIM Auto Tag 02.gif|thumb|600px|frame|center|Adding multiple labels with BlenderBIM add-on (click on the image and open original file to see the animation)]]
 
 
 
 
 
[[File:BlenderBIM Tagged IfcSpaces export.svg|thumb|600px|frame|center|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==
 
The exporter interpreting the variable also evaluates python functions included in the Property key field. This enables for example simple calculations like rounding - <code><nowiki>round({{BaseQuantities.GrossFloorArea}},1)</nowiki></code>, unit conversion, etc.
 
 
 
[[Category:Blender]] [[Category:BlenderBIM Add-on]]
 

Please note that all contributions to Wiki.OSArch are considered to be released under the Creative Commons Attribution-ShareAlike (see Wiki.OSArch:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: