Expression-based properties FAQ

Gabor Kovacs
Graphisoft
Graphisoft
Expression-based properties have been introduced as one of the main new features in ARCHICAD 22 to help designers in creating data-rich building models. Expressions process existing model data with functions and operators to create new information. For more details, please watch the following video playlist: https://www.youtube.com/playlist?list=PLnXY6vLUwlWUv8rM2RYu5RQnXVlZ-xdd7
Where can I find expressions in ARCHICAD? Expressions have been introduced as a new option for properties. Navigate to Options > Property Manager and select a property and choose Expression at VALUE DEFINITION. The expression can be typed-in on the popping-up Expression Editor dialog.

How does an expression build-up? Expressions are consisted of model parameters (like the calculated area of a zone), functions (like rounding) or operators (like subtraction) and user-defined numeric values or texts.

Are expressions for numeric calculations only? No. There are several logical, text editing and data conversion functions available as well apart from the standard mathematical, trigonometrical and statistical functions and operators.

The vast majority of the model data is numeric. What are logical, text editing and data conversion functions for? Logical functions (IF, AND, OR, etc.) are for building up complex calculation scenarios. For example you can set up a condition or (even a set of conditions) upon which the calculation result depends. Text editing (CONCAT, FIND, COMPARE, etc.) and data conversion (STR, STRTONUM, etc.) functions are great help in formatting the final result, like adding measure units to or forming complete, grammatically correct sentences with the calculated values.

What are sequences? Sometimes, similar types of information are stored under different parameters in different tools, which makes data collection cumbersome. Therefore, if necessary, expressions can handle multiple rows of sequences which refer to different types of elements. Each element will use only that segment which includes relevant and valid parameters for that element type. For example you can create a single label covering many different element types (doors, windows, walls, columns, etc.) which utilizes the same property but displays different content for each element type.

I am not familiar with calculations. How could I learn more about expressions? In general, expressions work on the same way as functions in the well-known spreadsheet applications. Tooltips help to understand functions and operators. Each function can be added with proper syntax including placeholder arguments which can be easily swapped to the desired ones. In aim to learn more about the available model data parameters, please visit the Element Parameters on the Help Center. For more details on functions and operators, please read Functions in Expressions.

Why are expressions available in element-level properties and not as a feature of the Interactive Schedules? We believe that the element-related information should be stored on element-level as it belongs to the element while schedules are just a view of the model consisted of those elements. Implementing calculations on schedule-level would restrict the use of this information in other element-level features like Labels, Graphic Overrides etc..

Are there any syntax rules for using spaces in expressions? You can both add or omit spaces, ARCHICAD will automatically set the proper spacing after you close the Expression Editor by clicking on OK.

Why is semicolon used as separator character in expressions instead of commas on some computers? Decimal and list separators are controlled centrally by the operating system and not by ARCHICAD. In aim to switch to the preferred separator at first you have to close ARCHICAD, change the language and regional settings of your operating system and restart ARCHICAD.

Can language and region setting differences cause any problems in teamwork mode? No, as commas and semicolons are just the preferred display mode of separators which are saved, interpreted and processed in the background exactly on the same way in both cases. Each user will see comma or semicolon separators in the expressions according to his/her own operating system settings.

Is it possible to paste expressions in the Expression Editor dialog? Yes. If you want to transfer your expressions to other projects it is recommended to export all properties and classifications that are referred in the expression into an XML file, and load this to the target project. You might as well directly access the necessary properties by loading them into the Property Manager from the source project file at import.

Why is it necessary to select parameters and properties from the drop-down list instead of typing their names simply into the text field? For practical reasons, parameters and properties are identified by invisible GUIDs (Globally Unique Identifiers) in the background and not by their names. Typing the name into the text field will not establish the link between the parameter/property name and the GUID.

Is it always necessary to set the AVAILABILITY FOR CLASSIFICATIONS of the properties used for calculations only? Yes, otherwise the properties will not be assigned to any elements.

Why is ‘<Expression>’ displayed at Element Selection Settings > Classification and Properties and in the Info Box the instead of the calculation results? In case of the Element Selection Settings dialog the expression calculation results may depend on model changes, that are not applied before closing the dialog. Hence, the results of these expressions can’t be evaluated before these changes are made. Changes made in the Info Box are instantly applied to the model, calculation result for performance reasons as these calculations may require time. These interfaces serve primarily for data input, rather than displaying calculation results. To review expression results while modeling, we recommend the Element Information palette, which displays all properties values, including expression-based ones. For reviewing results while setting up expressions, we recommend the Evaluate function in the Property Manager.

Is it possible to calculate dimensionless ratios and present the resulted values as percentages? Yes it is! Please multiply the result by 100, convert into a string and add ’%’ after it with the help of the CONCAT function.

Can I convert a numeric calculation result to a simple polar question answer (like yes/no or true/false)? Yes! Typical design validation scenarios are based on polar questions clarifying if your design meets the requirements from a certain aspect or not. You can create a separate property with True/False data type and create an expression which sets the value to True or False depending on the calculated value of the numeric property the validation is based on.

Can I filter elements based on their attribute settings in calculations? Yes, with the help of the IF function you can include only those elements which are placed on a specific layer for example.

Is it possible to add expression-based properties to GDL objects? Expression-based properties can be added to GDL objects as well like any other properties if you select the classification entities referring to GDL objects at Availability for classifications.

And what about door/window markers? Just as any door and window properties and parameters, expression-based properties of opening objects can be displayed in their markers too.

Is it possible to use GDL parameters (set in the object itself) or IFC properties (set in the IFC Project Manager) in expressions? Expressions can process element listing parameters, project info details, profile parameters, properties and classification data but have access neither to GDL object parameters nor to IFC properties.

Is it possible to use expressions for groups, for example gather the area of a logical group of zones? Properties can be assigned to elements but not to groups. For this reason, expressions can be evaluated for single elements only, and not for groups of elements.

Can I use component data for calculations? Building Material and Component listing parameters are not available in expressions as properties are implemented on element-level.

Is it possible to display the formula of an expression on a schedule? You can create a separate string property and copy the expression into its value field, as it is not possible to switch between the calculated value and expression display in case of the same property.

What happens if I change a calculated value manually in the schedule? It will define a static custom value to the involved property if you change the value of the expression defined property in the schedule. The result of all other expressions referring that property will be automatically recalculated.

Can expression-based properties be locked to their defaults in schedules? No, they can’t.

Is it possible to use expression-based properties in Graphic Overrides? Expression defined properties can be freely used as criteria, provided that they do not have reference to any model data which requires the regeneration of the 3D model. These are excluded from Graphic Overrides due to performance reasons.

Can I use expression-based properties in Labels? Expression-based properties, as any other custom properties can be displayed in symbol or autotext labels as well.

 
Comments
SidselVincents
Contributor

Hi - I'm having some trouble with an expression. I want the ouput to depend on the choice in an option set, which i got to work last week, but now i can't make it work again. Can you help me?

SidselVincents_0-1646645892915.png

SidselVincents_1-1646645959895.png

 

 

Laszlo Nagy
Community Admin
Community Admin

The Data Type of Option Sets is a String, not a Number. Currently, you are trying compare a String with a Number.

So, in your expression, try to put the 3 into parentheses, so it will be evaluated to be a String and the Glazing Type property can be compared to it:

IF ( Glazing Type = "3"; 10; 12 )
Saed Hassan
Newcomer

I want to calculate number of cements in wall block, used by ratio 1:5 = 6

((1/6) x Mortar Volume) /0.0345

Spoiler
 

Still looking?

Browse more articles

Back to articles

See latest solutions

Accepted solutions

Start a new discussion!