Document & Visualize forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Properties | Expression based on Renovation Status

Josh CSNZ
Enthusiast

I have set up a CONCAT expression to merge a bunch of various properties and text (for the sake of this example I'll refer to it as CONCAT-1.

 

I want the expression to present different information depending on the renovation status of the element.

 

I think what I need is an IF function, something like:

IF the element is new then show CONCAT-1,

IF the element is existing then show CONCAT-2,

IF the element is to be demolished then show CONCAT-3.

However, I am not having much luck at all with the IF function in the expressions.

 

ARCHICAD 18 - 25 (Build 7000 NZE FULL) | BIMcloud Basic

CADImage Tools Add-on (by Central Innovation)

Windows 10 Pro

Intel Core i7-6700K @4.00GHZ | 32Gb RAM

Dual Samsung S27F350 1920x1080

Nvidia Quadro K620
10 REPLIES 10

Josh CSNZ
Enthusiast

If it's of any use I have pasted the expression I have at the moment, where I have attemped an IF function, I'm cleary missing a fundamental step of how the IF function works wither particular respect to the "logical" field but not sure how to tackle.

 

IF ( {Property:CategoryPropertyDefinitionGroup/Renovation Status}=new, (CONCAT ( {Property:B1 | STRUCTURE/Timber size}, " ", {Property:B2 | DURABILITY/Treatment}, " ", "(", {Property:B1 | STRUCTURE/Type \/ Grade}, ")", " ", ( SPLITRIGHT ( {Property:ClassificationSystemPropertyDefinitionGroup/CBI Classification - Level 4 - 2019}, " ", 2 ) ), " with ", "Studs @ ", {Property:B1 | STRUCTURE/Studs}, " and ", "Nogs @ ", {Property:B1 | STRUCTURE/Nogs} )), - )

 

Screenshot 2021-09-13 164531.png

ARCHICAD 18 - 25 (Build 7000 NZE FULL) | BIMcloud Basic

CADImage Tools Add-on (by Central Innovation)

Windows 10 Pro

Intel Core i7-6700K @4.00GHZ | 32Gb RAM

Dual Samsung S27F350 1920x1080

Nvidia Quadro K620

Rajesh Patil
Enthusiast

Hi, I think you have made simple mistake in typing by missing " " signs . Renovation  = "New Status" and a the end "-"

2021-09-13.png

do try and let me know if I am able to solve your problem 👍

Rajesh Patil
AC 09-25 | INT | WIN10 64
Dell Inspiron 7591, Core i9, 9880H 2.30GHz, 16.0GB, NVidia GeForce GTX1650, 4.0GB, SSD Internal 500GB, Dell SSD External 250GB

You would be better using the IFS statement instead of IF, which would be more direct. Make sure the return type is set properly and also the classification.

Gerry

Windows 10 - Visual Studio 2019; ArchiCAD 25

Josh CSNZ
Enthusiast

Thanks guys,  I think I'm getting closer.

I ended up trying the IFS function as I have 3x logical tests (reno status').

Have only entered two so far.

 

Below is what I have updated to, but still comes up with syntax error.

I expanded out to hopefully make it clearer, I also included the default IFS fields as a guide.

 

Screenshot 2021-09-14 093951.png

 

 

 

ARCHICAD 18 - 25 (Build 7000 NZE FULL) | BIMcloud Basic

CADImage Tools Add-on (by Central Innovation)

Windows 10 Pro

Intel Core i7-6700K @4.00GHZ | 32Gb RAM

Dual Samsung S27F350 1920x1080

Nvidia Quadro K620

Actually even simplify the IFS expression is still producing a syntax error.
Screenshot 2021-09-14 094558.png

ARCHICAD 18 - 25 (Build 7000 NZE FULL) | BIMcloud Basic

CADImage Tools Add-on (by Central Innovation)

Windows 10 Pro

Intel Core i7-6700K @4.00GHZ | 32Gb RAM

Dual Samsung S27F350 1920x1080

Nvidia Quadro K620

Remove the square brackets. Square brackets indicate the statements is optional and brackets should not be included.

Values are case sensitive Values should be "New" and "Existing"

Gerry

Windows 10 - Visual Studio 2019; ArchiCAD 25

Josh CSNZ
Enthusiast

Thanks, so close, still coming up against syntax errors as I develop further.
I have done a screen recording https://youtu.be/vGhFH_tvyeQ


I have tried to develop further using IFS
The below works

IFS ( {Property:CategoryPropertyDefinitionGroup/Renovation Status} = "New", ( ( CONCAT ( {Property:CategoryPropertyDefinitionGroup/Renovation Status}, " ", {Property:B1 | STRUCTURE/Timber size}, " ", {Property:B2 | DURABILITY/Treatment}, " ", "(", {Property:B1 | STRUCTURE/Type \/ Grade}, ")", " ", ( SPLITRIGHT ( {Property:ClassificationSystemPropertyDefinitionGroup/CBI Classification - Level 4 - 2019}, " ", 2 ) ), " with ", "Studs @ ", {Property:B1 | STRUCTURE/Studs}, " and ", "Nogs @ ", {Property:B1 | STRUCTURE/Nogs} ) ) ) )

 

If I try adding another expression beneath it doesn't recognize the second expression


 

IFS ( {Property:CategoryPropertyDefinitionGroup/Renovation Status} = "Existing", ( CONCAT ( {Property:CategoryPropertyDefinitionGroup/Renovation Status}, " ", ( SPLITRIGHT ( {Property:ClassificationSystemPropertyDefinitionGroup/CBI Classification - Level 4 - 2019}, " ", 2 ) ), " to remain" ) ) )

 

If I try add to the end of the first expression, I stell get syntax errors.


IFS ( {Property:CategoryPropertyDefinitionGroup/Renovation Status} = "New", ( ( CONCAT ( {Property:CategoryPropertyDefinitionGroup/Renovation Status}, " ", {Property:B1 | STRUCTURE/Timber size}, " ", {Property:B2 | DURABILITY/Treatment}, " ", "(", {Property:B1 | STRUCTURE/Type \/ Grade}, ")", " ", ( SPLITRIGHT ( {Property:ClassificationSystemPropertyDefinitionGroup/CBI Classification - Level 4 - 2019}, " ", 2 ) ), " with ", "Studs @ ", {Property:B1 | STRUCTURE/Studs}, " and ", "Nogs @ ", {Property:B1 | STRUCTURE/Nogs} ) ) ) ),( {Property:CategoryPropertyDefinitionGroup/Renovation Status} = "Existing", ( CONCAT ( {Property:CategoryPropertyDefinitionGroup/Renovation Status}, " ", ( SPLITRIGHT ( {Property:ClassificationSystemPropertyDefinitionGroup/CBI Classification - Level 4 - 2019}, " ", 2 ) ), " to remain" ) ) )

 

If I try add square brackets like in the default I still get syntax errors.

 

ARCHICAD 18 - 25 (Build 7000 NZE FULL) | BIMcloud Basic

CADImage Tools Add-on (by Central Innovation)

Windows 10 Pro

Intel Core i7-6700K @4.00GHZ | 32Gb RAM

Dual Samsung S27F350 1920x1080

Nvidia Quadro K620

The default looks like this.
IFS ( LogicalCondition1, Value1, [LogicalCondition2, Value2], ... )
If I just try replacing the fields and leaving brackets in place I would have thought that would work.

ARCHICAD 18 - 25 (Build 7000 NZE FULL) | BIMcloud Basic

CADImage Tools Add-on (by Central Innovation)

Windows 10 Pro

Intel Core i7-6700K @4.00GHZ | 32Gb RAM

Dual Samsung S27F350 1920x1080

Nvidia Quadro K620

Success!!!

IFS ( {Property:CategoryPropertyDefinitionGroup/Renovation Status} = "New", ( ( CONCAT ( {Property:CategoryPropertyDefinitionGroup/Renovation Status}, " ", {Property:B1 | STRUCTURE/Timber size}, " ", {Property:B2 | DURABILITY/Treatment}, " ", "(", {Property:B1 | STRUCTURE/Type \/ Grade}, ")", " ", ( SPLITRIGHT ( {Property:ClassificationSystemPropertyDefinitionGroup/CBI Classification - Level 4 - 2019}, " ", 2 ) ), " with ", "Studs @ ", {Property:B1 | STRUCTURE/Studs}, " and ", "Nogs @ ", {Property:B1 | STRUCTURE/Nogs} ) ) ), {Property:CategoryPropertyDefinitionGroup/Renovation Status} = "Existing", ( ( CONCAT ( {Property:CategoryPropertyDefinitionGroup/Renovation Status}, " ", ( SPLITRIGHT ( {Property:ClassificationSystemPropertyDefinitionGroup/CBI Classification - Level 4 - 2019}, " ", 2 ) ), " to remain " ) ) ), {Property:CategoryPropertyDefinitionGroup/Renovation Status} = "To Be Demolished", ( ( CONCAT ( ( SPLITRIGHT ( {Property:ClassificationSystemPropertyDefinitionGroup/CBI Classification - Level 4 - 2019}, " ", 2 ) ), {Property:CategoryPropertyDefinitionGroup/Renovation Status} ) ) ) )

ARCHICAD 18 - 25 (Build 7000 NZE FULL) | BIMcloud Basic

CADImage Tools Add-on (by Central Innovation)

Windows 10 Pro

Intel Core i7-6700K @4.00GHZ | 32Gb RAM

Dual Samsung S27F350 1920x1080

Nvidia Quadro K620

You can not have two expressions within the same expression sequence.

Use the ADD button to make a new expression sequence and place your second expression in it. The program will use the first expression sequence that is valid. Otherwise, all must be in the same expression.

Gerry

Windows 10 - Visual Studio 2019; ArchiCAD 25

Start a new conversation!

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!