The Calculate Properties tools calculate property values based on formulas and thus derive new data into the model based on existing properties. There are altogether four different Calculate Properties tools, each for different kinds of calculations. They all share the common settings described in this document.
| Calculate Properties for Objects | Calculates new properties for building elements |
| Aggregate Properties for Groups | Aggregates property values to the group object itself from the objects the group contains. |
| Aggregate Properties for Containers | Aggregates property values to the container object itself from the objects the container contains. |
| Calculate or Aggregate Properties for Connected Objects | Calculates and aggregates property values for the objects that are connected with a connection property. |
Settings
All four tools have some common configurations, and some are specific to each. Let’s first go through the common ones.
Target
Defines the objects that are used in the calculation. You can select, for example, the objects of an object class, a group or a group category.
Excluded objects are not used in the calculation. Objects that are Not Decided Yet are used only if no objects have been included. You can read more about these in Include/Exclude Objects.
In the Aggregate Properties for Groups tool the Target defines the groups, and in the Aggregate Properties for Containers tool the containers, whose property values are calculated. These tools describe their Target in their own articles.
Formula
This is where the magic happens.
In general, the tools support most of the standard Excel-functions. If you can use your formula in Excel, you should be able to use it here. With some limitations of course.
You can use basic math and trigonometric functions. These include +, -, * and /. But also functions like ABS(), SIN(), and POWER().
Unlike Excel we DON’T use the = prefix in the formula.
Few important formatting guidelines. Constant text is placed inside quotes (“Your text”). For constant numbers, you can use local decimal delimiters (, or . depending on your locale). Don’t use thousands separators. In formulas, use ‘;‘ as parameter separator. For example IF(something;then this;otherwise this)
Note that aggregating calculations like SUM are done with the help of the aggregation types, not directly in the formulas. The formula you define is always applied to one object at a time.
For dates and times you can use functions like TODAY(), NOW(), WEEK(), YEAR(), HOUR(), DATEADD() and DATEDIFF().
Finally, you can use logic in your formulas. Comparing items with <,>,<=,>= and = or <>. Or even IF functions. The formulas support even nested IF functions. More about them in the examples.
In the formula, you can use different kinds of items:
Constant Values
This can be a whole or decimal number like 2000 or 2000,00. Use the delimiters of your own local. For example ‘,’ in Finland and ‘.’ in US.
Text constants are placed inside quotes. For example: “My text”.
Constant date values are explicitly defined by the DATAVALUE function. For example: DATAVALUE(“2/3/2023”). Note that constant dates must be given in this format: mm/dd/yyyy.
Constants for boolean values are TRUE and FALSE.
Function Formating
Use the semicolon character ‘;’ to separate multiple parameters. For example:
IF([Width]>=10000; “Special Object”; “Normal”)
Object Property Values
Object properties are represented in the formulas in a specific format. The name or key of the property must be surrounded by brackets. For example, ‘Net Volume’ should be written as [Net Volume] in the formula.
You can use properties of any data type in your formulas. Just make sure, that the formula makes sense. For example, you cannot multiply a number by a text.
Group Property Values
If your input to the tool is either Group or Group Category, then in addition to object properties, you can use group properties in your calculations. Say for example that you have set the workload multiplier to your groups, and you want to calculate the actual workload for each object within the group.
The group properties must be represented in a specific format. First of all, they too must be within brackets. Also, they need to be separated from object properties with the Group| -prefix. Your formula would then look something like this:
[Group|My Workload]*[Net Volume]
You can use group properties of any data type in your formulas. Just make sure the formula makes sense.
Container Property Values
If you are using the Calculate Properties for Containers or the Calculate Properties for Connected Objects tool, then in addition to object properties you can use container properties in your formulas. This works the same way as the group properties. However the format for the container properties is as follows: [Parent|My Workload].
Defining the units
One of the great things about IFC models is that they know, which units they are using. Then again not all the IFC models are in the same units. Because of this, extra care needs to be taken in the calculation, so that your end result is correct. For example, it probably doesn’t make sense to multiply values in mm with values in m. When calculating values in derived units, this gets even more complicated. If your density is in kg/m3, then you must make sure that your volume is in m3.
Luckily enough these challenges can be handled in the formulas by defining the units. The unit is defined within in curly brackets. For example {mm}. The unit for an object or group property must be defined within the brackets. For example [Net Volume {m3}].
This way your model can be in any unit, and the calculator will automatically convert the values to your chosen unit before doing the actual calculation.
Note that only basic units are supported. You can see the supported units from the Result Unit drop down.
Finally make sure that your result units is inline with your unit definitions in the formulas. If you are multiplying millimeters, but set the result unit to meters, then you will get too big numbers as result.
Create if Missing
Defines how the Result Property is found in the model, and whether it is created when it is missing. The default value is ON.
If ON, the Result Property is the name of a property in the property set defined by PropertySet Name. The tool uses that property if it already exists, and creates it if it does not. A property with the same name in another property set is not used: the property is created in the defined property set instead. Letting the tool create the property saves you the trouble of adding it separately with the Add Property tool. In order for Simplebim to export the property to IFC, it needs to know which property set the property belongs to, and this is why the property set is needed. This is just how IFC works.
If OFF, the Result Property is the key or name of a property that already exists in the model. It can be a property in any property set or an attribute defined by the IFC schema, for example Name or Description. Nothing is created. If an object class in the Target does not have the property, the tool reports this once for the object class and skips its objects.
In Simplebim 12.0 SR1 only the Calculate Properties for Objects tool uses this setting. The Aggregate Properties for Groups, Aggregate Properties for Containers and Calculate or Aggregate Properties for Connected Objects tools create the Result Property when it is missing also when the setting is OFF.
PropertySet Name
This setting is available when Create if Missing is ON.
The name of the property set in which the Result Property is looked for and, if needed, created. If the property set already exists in the model, the property is created to the existing one. If the property set is not yet in the model, it is created. The name can be basically anything, probably some property set of your own: the one your company uses, or one that a BIM exchange requirement has defined. The default value is My Properties.
Result Property
The result property is the name or key of the property, to which the calculation result will be set. This can be the property of an object, a group, or a container, depending on the tool you use.
When Create if Missing is ON, use the name of the property. The property is looked for by its name in the property set defined by PropertySet Name, and created there if it is missing. An identity key is not recognized in that case, and the tool would create a new property with the key as its name. When Create if Missing is OFF, you can use either the name or the key of an existing property.
If the property already exists in the model, then that one is used. The existing property will also define the datatype and in the case of measure values the unit of the result. Conversions are done automatically if needed. Note that not all conversions are possible. For example, the calculator cannot convert a text result to a number if the text contains alphabetic.
If the property does not exist in the model and Create if Missing is ON, then a new property is automatically created. The property is created with the given name. The data type is defined by the calculation result, or if you have explicitly defined a result unit, then the result property is created as a measure value property of that unit. You can also set the data type with Force Data Type.
Beware of existing properties!
The tool will not re-define existing properties. If a property with the same name already exists, then the existing property will be used as-is. For example if there is an existing property with the name ‘Net Area’ with the data type ‘Number’, and you try to define a new property ‘Net Area’ with the data type ‘Area Measure‘, then the data type of the property ‘Net Area’ will remain ‘Number’.
Result Unit
When we talk about enriching BIM data we are most of the time talking about calculating measure units: lengths, areas, volumes, weights, time, cost…
Because the formula can be basically anything, the system cannot reliably guess the unit you are aiming for. This is why whenever you are calculating measure values, you should explicitly define the resulting unit. This way the tool is able to create the right kind of property for your result and convert the result back to model units in the right way. Just make sure that the units you are using in your formula is in line with the result unit.
Note that there are different unit symbols for length, area, and volume units, for example, mm, mm2 and mm3.
Force Data Type
This setting is available when Create if Missing is ON.
Usually, you can leave this parameter to its default. However, whenever you want to force the end result to a number, text, or boolean value, you should use this. This comes in handy when you are for example multiplying measure values in your formula, but there’s no result unit in Simplebim/IFC that you would want to use. You can then save the result as a number, and it is then your and the user’s responsibility to know, what units that number represents. Or you could for example make a calculation, but want to save the result as text.
The available data types are Number, Text, Whole Number and Yes/No. The default value is <Not Used>.
Example Formulas
Here are some common examples you to get started. Note that in order to apply these to your models, you of course need to adjust the values and property names accordingly.
For all these, you need to use the Calculate Properties for Objects tool.
The very basic formula is to set a constant for all the objects assigned to the given groups. This can be a number or string or date. Simply write the constant to the formula:
1000 or 0,5 or “My constant text” or DATEVALUE(03/18/2023)
Next, you could for example multiply some measure value with a constant. This could be for example a density times volume. In my example my density is defined in m3/kg:
7250*[Volume{m3}]
Next, you could multiply, divide add or subtract property values from each other. For example:
[Length]*[Height]
Or you could combine text together something like this:
[Building Element Construction Type] & [Height] & “-” & [Width]
For the next one, you have to have some meaningful group properties defined. Say you have the workload multiplier defined in the group property and you want to multiply the volume of the objects with it.
[Group|Workload]*[Volume]
How about the date operations? Let’s compare the current date to the one defined in the object properties and set a Boolean value indicating whether the object is late or early.
[My Date]<TODAY()
Now it gets interesting. What if I want to include some logic in my calculations? Let’s say I want to set a string value based on some calculation. Note the items in the IF function are separated with semicolons.
IF([Group|My Group Prop]*[Width]>=1000; “Special Object”; “Normal”)
Now let’s go nuts and use nested IF functions. Let’s choose the measure value to multiply based on another property:
IF([Measure Type]=”rm”; [Length][My Multiplier];IF([Measure Type]=”m3″; [Net Volume][My Multiplier];IF([Measure Type]=”m2″; [Area]*[My Multiplier];0)))
Final thoughts
There you go. Calculate Properties tools are not a children’s toy, but you can do magical things with them! Remember that the designer’s model is just the starting point. Just like when using documents, you need to enrich the design data further in order to use it in the other functions. Whether it is cost estimating, procurement, tendering, production planning, scheduling, logistics, or something else.
Using Calculate Property tool gets even more powerful if you have first standardized and normalized the models. This is also what Simplebim can do for you. This way you could use the same formulas for all of your models and in every project.
Please let us know if you figure out some valuable, new way to use this tool, or of course if you run into any issues. Math is always dependable! Happy calculating.
Release Notes
Simplebim 12.0 SR1
- New Create if Missing setting. When it is OFF, the Result Property is an existing property found by its key or name, so you can also calculate values into the attributes defined by the IFC schema. Previously the values could be calculated only into property set properties. PropertySet Name and Force Data Type are now available only when Create if Missing is ON.
- The Objects setting was renamed to Target. In the Aggregate Properties for Groups tool the setting was called Group or Group Category.
- An object class in the Target that does not have the Result Property is reported once. Previously the tool reported an error for every object of the object class.
Related to
Comments
0 comments
Please sign in to leave a comment.