Collaboration with other software
About model and data exchange with 3rd party solutions: Revit, Solibri, dRofus, Bluebeam, structural analysis solutions, and IFC, BCF and DXF/DWG-based exchange, etc.

Expressions as IFS values doesn't work for me

Mats_Knutsson
Advisor
Hi,

This is an edited post. I managed to go incognito at work and have been reading up on expressions and I'm close to where I want.

I can't seem to use a property as a Value in an IFS (IF Multiple) statement. Is this true?

Regards,
Mats
AC 25 SWE Full

HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
10 REPLIES 10
Laszlo Nagy
Community Admin
Community Admin
I tried this and it did not work for me either.
Then I realized that if "A" is a Property available for all Classifications, then A1, A2, and A3 also need to be available for all Classifications (since the value of A depends on all of them).
When I made this change, it worked for me.

(I hope this will work. However, in my example, I set A1, A2, and A3 to specific numeric values (1, 2, 3) so they were not Expression-defined properties as they are in your example.)

Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Mats_Knutsson
Advisor
It a word mix up. I'm after the value in the IFS...I want the IFS-value to read a property defined as an expression.

IFS (Logical1, Value1, [Logical2, Value2]...)

Great session you had about CW last friday Lazlo!
AC 25 SWE Full

HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
Laszlo Nagy
Community Admin
Community Admin
Mats_Knutsson wrote:
Great session you had about CW last Friday Laszlo!

Thanks. I hope people found it useful.


It a word mix-up. I'm after the value in the IFS...I want the IFS-value to read a property defined as an expression.

Could you explain this a bit more? I do not understand now what you are trying to achieve.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Mats_Knutsson
Advisor
In my first image the properties A1 to A3 are expressions.
When I want to use A1-A3 as value in the IFS statement I get the error.
AC 25 SWE Full

HP Zbook Fury 15,6 G8. 32 GB RAM. Nvidia RTX A3000.
Laszlo Nagy
Community Admin
Community Admin
Can you show some screenshots that show the expressions you used to define A1, A2, and A3?
Also, are A1, A2, and A3 made available to the "Window" Classification?
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
marian_sdraila
Booster
I'm trying to do exactly the same thing and it doesn't work for me either!

In my case, I have a ceiling modeled out of multiple element types and I'm trying to get the surface area of all the different elements in the same schedule column.

The expression looks like this:

IFS ( Element Type = "Curtain Wall", Surface Area including Boundary , Element Type = "Roof", Net Surface Area of the Bottom , Element Type = "Shell", Net Surface Area of the Opposite to Reference Side , Element Type = "Slab", Bottom Surface Area , Element Type = "Wall", Net Surface Area on the Outside Face )

All those different element types have the same classification!
ArchiCAD 23
Windows 10
Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz
NVIDIA Quadro P4000, 8GB - 64 GB RAM
poco2013
Mentor
I believe that within a Expression, if any parameter used is not applicable to the element it is applied to, that expression will fail. it does not matter, if the the logic can never reach that part of the expression.

Use a Sequence(s) instead?
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
marian_sdraila
Booster
Tanks for the reply!

That makes the IFS function quite limited and in my case useless!

What do you mean by sequence?
ArchiCAD 23
Windows 10
Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz
NVIDIA Quadro P4000, 8GB - 64 GB RAM
poco2013
Mentor
Within the Expression edit dialog is the sequence dialog in which you can put in multiple expressions which are independent of each other. There, just add a IF statement for each element type ( NOT IFS) using the ADD button for each new expression.

The program will work down through the various expression statements and ignore any that are not applicable to the element type the property is attached to. When it finds one that works ,with that element, it will execute that expression and return its value. It then stops at the first expression that works. This is called a sequence.

EDIT: note that in some cases you don't even need the if statements, if the returned parameter for each element is only applicable to that element. In that case just list the properties in the sequence box and the program will pick the right one.

Multiple IF in a sequence may cause a conflict when both the true and false parameters are applicable to two or more elements, the program will just use the first one. In that case the above is best.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27