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.
Objects
The tool takes in either a group, a category of groups, or object classes. These define the objects that are used in the calculation.
The group or category is defined in the dialog. The drop-downs show the groups, group categories, and object classes found in the model. Optionally, you can type the group, group category, or object class name or key. This makes sense when you are creating generic calculation rules, which can be applied to many different models.
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.
Property Set Name
The property set name is used, either to find your result property from the right property set, or when the tool automatically creates your result property. This happens, when the tool cannot find the Result Property from the model. This is not a mistake. It is actually very convenient to let the tool create the properties. This way you can skip the extra step of adding the property separately to the model. However, in order for Simplebim to export the Result Property to IFC, it needs to know, which property set it belongs to. This is just how IFC works. Use the Property Set Name to define the property set. This can be basically anything. Probably some property set of your own. The one your company uses, or some BIM exchange requirement has defined.
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.
If you already have a property with this name or key defined 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 with the given name or key does not exist in the model, 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.
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
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.
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.
Related to
Comments
0 comments
Please sign in to leave a comment.