Project data & BIM
About BIM-based management of attributes, schedules, templates, favorites, hotlinks, projects in general, quality assurance, etc.
SOLVED!

Conditional Statement [Element Type] Criteria for Property Expressions

LibbyH
Contributor

Hi all,

 

Question for the community regarding expressions in the property manager.

 

(1) I'm trying to define two criteria (using IFS and AND) to create an output for our finish schedule. If an element is classified in a certain branch AND it's a certain element type, it should output another property we created "FFE FINISH | SURFACE - SLAB [TOP]", see attached for the two methods I've tried and still not successful. 

 

Variations I've also tried:

- Changing "7" to "Slab" - I saw on GDL that the slab element type is given the index 7. I tried inputting without quotation marks, and archicad says that is the wrong data type for the argument, it must be a string. 

- I've tried outputting a built-in slab property rather than our custom property - still doesn't work.

 


Screenshot 2024-11-21 at 11.36.19 AM.pngScreenshot 2024-11-21 at 11.38.43 AM.png

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Sequences are evaluated from top to bottom. If the property is not available for the element being evaluated, Archicad moves to the next sequence. If the property is available, the execution of the sequences stop there and the rest of sequences are ignored.

 

So you need to organize the order of the sequences so that the most specific one (in this case the Left Side Surface property of the beam) is on the top and the most generic one (Surface) is on the bottom.

 

You don't necessarily need IFS statements if the property is not available for other items.

 

In the screenshot below I have four elements selected, a wall, slab, object and a beam.

 

vlahtinen_0-1733742709005.png

 

View solution in original post

9 REPLIES 9
Ricardo Lopez
Expert

Hi @LibbyH 

 

I think it is not possible to change one Element Type to be another one because that is the Archicad tool with which it was originally made.

Maybe you could try to change its Classification instead and use that criteria for your schedules.

 

Regards.

M. Arch. Ricardo López
BIM Consultant | Project Solutions and Services | Panama
AC17-28 SPA+INT | Windows 11 | MSI CreatorPro M16 HX C14VJG, 64GB, Nvidia Quadro RTX 2000 Ada Generation
vlahtinen
Enthusiast

You should just use "Slab" instead of "7" in the expression. GDL constants don't apply here.

 

For me the following expression works fine:

vlahtinen_0-1732477683926.png

In the expression "Finish" is a custom property that's available for elements classified as "Slab".

 

The result for an element, which is modeled using the slab tool and is classified as "Slab", is the value of the property "Finish". If the evaluated element is not slab or is not classified as "Slab", the result is either undefined or "---" (the expression cannot be evaluated since the referred Finish property is not available).

 

Make sure that both properties are available for the classification to which the elements are assigned.

 

If this wasn't helpful, please elaborate, how it doesn't work? What does the expression return and how it's different from what you want it to be?

Thank you both for the responses. My direction has shifted slightly since the original post.... the overall goal is to make a label populate with the surface name depending on what type of element is being labeled. I've also named the surface strategically, so I'm using a delimiter ":" to separate the shorthand vs. description, and I'm populating the label with the shorthand. Here's what I've tried (and the properties are available for all relevant classifications). 

 

Screenshot 2024-12-05 at 2.12.59 PM.png

When I use this property in the label, however, the element type condition seems irrelevant as the label just populates with the "Surface" property - the property listed in the first line. If I switch the order of these conditions, then whichever output property is on top is what displays. I've also tried to put all conditions in the same "IFS" statement, but that doesn't seem to be working either. I should also mention I don't want to use classifications as a search method because that would involve creating additional unnecessary classifications and assigning those to various elements in order for them to label correctly, when really I just want to utilize the element type as the search criteria (without creating extra steps, if that makes sense).

 

... correction on that last post - the IFS statements work for all element types EXCEPT beams and stairs. Can't get either of those to work.

Solution

Sequences are evaluated from top to bottom. If the property is not available for the element being evaluated, Archicad moves to the next sequence. If the property is available, the execution of the sequences stop there and the rest of sequences are ignored.

 

So you need to organize the order of the sequences so that the most specific one (in this case the Left Side Surface property of the beam) is on the top and the most generic one (Surface) is on the bottom.

 

You don't necessarily need IFS statements if the property is not available for other items.

 

In the screenshot below I have four elements selected, a wall, slab, object and a beam.

 

vlahtinen_0-1733742709005.png

 

LibbyH
Contributor

Thank you! That worked! The only thing I can't get to populate is the stair finish... I don't see a surface property option for a stair. Any recommendations for a workaround? The general surface parameter doesn't seem to register either for the stair. 

A stair is a combination of other objects.

So the stair itself does not have a finish.

You need to look at the components - tread, riser, structure.

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

True, however I'm not finding the surface property available for any of the stair components in the available properties drop-down for the expression...unless I'm overlooking it?


Screenshot 2024-12-10 at 8.41.33 AM.pngScreenshot 2024-12-10 at 8.41.24 AM.pngScreenshot 2024-12-10 at 8.41.28 AM.png

Can't say for sure, but I believe it's not possible to get the material of stair elements.

 

I think the best approach is to create a separate property for stair material that's available only for stairs. Material then needs to be written manually for each stair in elements' properties. This new property can be added as the last sequence to the expression property so it's possible to label all elements using the same label and property.

 

This is of course error-prone because one has to remember to update the property when the material changes.