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.

Merged properties expression

Kaspars
Booster
Hello,
i'm developing Archicad template now, and wanted to set expression based properties using CONCAT function for door taging/naming by merging different "option set" based properties. Can someone help how to solve situation when one of the basic parameters sometimes should be set "undefined" and thus in the expression based CONCAT function property that one field don't have to be included.
Problem is- the whole expression based value is changing to <undefined> if one of parameters is set as "undefined". For example sometimes i want type of the door to be named "FDR-G" but for other doors just "FDR" without additional option set property included.


Hope my question is somewhat understandable,
Thx,
Kaspars
4 REPLIES 4
runxel
Legend
Thats what `ISUNDEFINED ( )` is for.

Which AC version are you working on? I'm not sure if that command was there from the beginning (e.g. `IFS` was also added later...).
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Kaspars
Booster
I'm developing template now in AC 24
So, if expression line now goes
CONCAT ( Property1; "-";Property2 )
then how do I use that 'ISUNDEFINED' to disable not used subProperty?

Thx,
Kaspars
runxel
Legend
Like this:

concat (
	if (
		isundefined ({Property:YourGroup/Prop1});
		"";
		{Property:YourGroup/Prop1}
	);
	if (
		or (
			isundefined ({Property:YourGroup/Prop1});
			isundefined ({Property:YourGroup/Prop2})
		);
		"";
		"–"
	);
	if (
		isundefined ({Property:YourGroup/Prop2});
		"";
		{Property:YourGroup/Prop2}
	)
)
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
Kaspars
Booster
Thx a lot,
i'm new to expressions,
will try to figure out logic behind those lines

Kaspars