Collaborate forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Expressions as IFS values doesn't work for me

Mats_Knutsson
Advocate
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 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB
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.)

....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, NVidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Mats_Knutsson
Advocate
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 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

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.
....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, NVidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

Mats_Knutsson
Advocate
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 24 SWE Full
HPZbook 32GB i7 7820HQ 2,9 GHz
Quadro M2200 2GB

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?
....................................................................................................
Laszlo Nagy, Lead Moderator, Community Admin
Get Archicad Tips at https://twitter.com/laszlonagy
AMD Ryzen 1700X CPU, 48 GB RAM, NVidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), WIN10 PRO ENG, AC20-AC25
Loving Archicad since 1995

marian_sdraila
Newcomer
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
Advisor
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 10 - Visual Studio 2019; ArchiCAD 25

marian_sdraila
Newcomer
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
Advisor
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 10 - Visual Studio 2019; ArchiCAD 25

marian_sdraila
Newcomer
Oh man, it was so easy, I had no ideea you can do that! And you were right, the IF function was not needed at all!
Thanks a lot!
ArchiCAD 23
Windows 10
Intel(R) Xeon(R) Silver 4110 CPU @ 2.10GHz
NVIDIA Quadro P4000, 8GB - 64 GB RAM

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!