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

Merged properties expression

Kaspars
Contributor
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
Mentor
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...).
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Kaspars
Contributor
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
Mentor
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}
	)
)
AC 24 [ger] | Win 10 | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Kaspars
Contributor
Thx a lot,
i'm new to expressions,
will try to figure out logic behind those lines

Kaspars

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!