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

Layers in expressions

RandyC
Advocate
Can an expression be restricted to a specific layer ? if so any idea how ?

Thanks , Randy
ArchiCAD 4.5 --- 27 , Win 10 , dual monitors, 64 gb ram,Nvidia GeforceRTX 2080 TI, I-9
5 REPLIES 5
poco2013
Mentor
Yes -- Simply include the property 'layer' within your IF statement as in: IF ( Logical, ValueIfTrue, ValueIfFalse )


Layer is listed under general parameters and is available for all elements.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
RandyC
Advocate
Thanks poco2013 for the insight however I think I am not doing the expression correctly
I am trying to get the area of all zones on the "floor area" layer - can you show me my error ?
Thanks , Randy
ArchiCAD 4.5 --- 27 , Win 10 , dual monitors, 64 gb ram,Nvidia GeforceRTX 2080 TI, I-9
poco2013
Mentor
Your using a assignment -- try a conditional like:

IF ( CONTAINS ( "A - Zones - Room.3D", {Property:General Parameters/Layer}, FALSE ), {Property:Zone/Measured Area}, 0 ft2 )

EDIT: Note all returns must have the same units
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
RandyC
Advocate
Gerry you seem to have expressions down pat -- I however am lacking
I did get a result with :

IF ( CONTAINS ( "Floor Area", {Property:General Parameters/Layer}, FALSE ), {Property:Zone/Measured Area}, 0 ft2 )

when I select a zone it shows as working but
when I introduce it to a schedule it only returns "0"

Thank you for your help ,
Randy
ArchiCAD 4.5 --- 27 , Win 10 , dual monitors, 64 gb ram,Nvidia GeforceRTX 2080 TI, I-9
poco2013
Mentor
If its returning 0, probably the layer name is somehow mismatched as it is returning the false statement

Double check by first selecting your zone then open property manager, select your property, click on Evaluate in your property manager to see what is returned and then troubleshoot there.

Make sure you have set the classifications properly both for the property and the zone.
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27