Documentation
About Archicad's documenting tools, views, model filtering, layouts, publishing, etc.

Properties | Expression based on Renovation Status

Josh Verran
Advisor

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.

 


GRAPHISOFT Certified BIM Manager | Senior BIM Specialist | LinkedIn


ARCHICAD 18-28 | BIMcloud | CI Tools | Grasshopper - Rhino | CloudCompare | Bluebeam


Australia & New Zealand


Windows 11 Business | Intel Core i9-13950HX @2.2GHZ | 64Gb RAM | 2x Samsung S27F350 1920x1080 60Hz | Nvidia RTX 4000 Ada Generation Laptop GPU (12Gb)



10 REPLIES 10
Josh Verran
Advisor

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


GRAPHISOFT Certified BIM Manager | Senior BIM Specialist | LinkedIn


ARCHICAD 18-28 | BIMcloud | CI Tools | Grasshopper - Rhino | CloudCompare | Bluebeam


Australia & New Zealand


Windows 11 Business | Intel Core i9-13950HX @2.2GHZ | 64Gb RAM | 2x Samsung S27F350 1920x1080 60Hz | Nvidia RTX 4000 Ada Generation Laptop GPU (12Gb)



Rajesh Patil
Expert

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-27 | INT | WIN11 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 11 - Visual Studio 2022; ArchiCAD 27
Josh Verran
Advisor

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

 

 

 


GRAPHISOFT Certified BIM Manager | Senior BIM Specialist | LinkedIn


ARCHICAD 18-28 | BIMcloud | CI Tools | Grasshopper - Rhino | CloudCompare | Bluebeam


Australia & New Zealand


Windows 11 Business | Intel Core i9-13950HX @2.2GHZ | 64Gb RAM | 2x Samsung S27F350 1920x1080 60Hz | Nvidia RTX 4000 Ada Generation Laptop GPU (12Gb)



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


GRAPHISOFT Certified BIM Manager | Senior BIM Specialist | LinkedIn


ARCHICAD 18-28 | BIMcloud | CI Tools | Grasshopper - Rhino | CloudCompare | Bluebeam


Australia & New Zealand


Windows 11 Business | Intel Core i9-13950HX @2.2GHZ | 64Gb RAM | 2x Samsung S27F350 1920x1080 60Hz | Nvidia RTX 4000 Ada Generation Laptop GPU (12Gb)



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 11 - Visual Studio 2022; ArchiCAD 27
Josh Verran
Advisor

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.

 


GRAPHISOFT Certified BIM Manager | Senior BIM Specialist | LinkedIn


ARCHICAD 18-28 | BIMcloud | CI Tools | Grasshopper - Rhino | CloudCompare | Bluebeam


Australia & New Zealand


Windows 11 Business | Intel Core i9-13950HX @2.2GHZ | 64Gb RAM | 2x Samsung S27F350 1920x1080 60Hz | Nvidia RTX 4000 Ada Generation Laptop GPU (12Gb)



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.


GRAPHISOFT Certified BIM Manager | Senior BIM Specialist | LinkedIn


ARCHICAD 18-28 | BIMcloud | CI Tools | Grasshopper - Rhino | CloudCompare | Bluebeam


Australia & New Zealand


Windows 11 Business | Intel Core i9-13950HX @2.2GHZ | 64Gb RAM | 2x Samsung S27F350 1920x1080 60Hz | Nvidia RTX 4000 Ada Generation Laptop GPU (12Gb)



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} ) ) ) )


GRAPHISOFT Certified BIM Manager | Senior BIM Specialist | LinkedIn


ARCHICAD 18-28 | BIMcloud | CI Tools | Grasshopper - Rhino | CloudCompare | Bluebeam


Australia & New Zealand


Windows 11 Business | Intel Core i9-13950HX @2.2GHZ | 64Gb RAM | 2x Samsung S27F350 1920x1080 60Hz | Nvidia RTX 4000 Ada Generation Laptop GPU (12Gb)