BIM Coordinator Program (INT) April 22, 2024
Find the next step in your career as a Graphisoft Certified BIM Coordinator!
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.

Using Expressions to filter and list information

Hi all,

We are trying to list Element ID numbers but only the information in the element ID number up until the second dash and only Element ID numbers beginning with a number. But we are getting all values.
Any suggestions?

IF ( ( FIND ( LEFT ( {Property:General Parameters/Element ID}, 1 ), {Property:General Parameters/Element ID} ) ) = 1, LEFT ( {Property:General Parameters/Element ID}, FIND ( "-", {Property:General Parameters/Element ID}, 1 + FIND ( "-", {Property:General Parameters/Element ID} ) ) - 1 ), " " )
Kind Regards,



Sebastian Monroe

Director/Architect



T: +61 3 9017 6666

www.codearchitecture.com.au

NOM ARCH VIC ARB: 17939

Archicad v26, Mac Mini INTEL 64GB, AMD Radeon Pro
5 REPLIES 5
poco2013
Mentor
Expressions can not be used to filter elements as expressions must always return something or they will return a error.
So, while you could filler and return element id's which meet your criteria, those that do not would return a error i.e. "---".
To return ID's meeting your criteria use:( first chars must be a number & then take up to second "-").

IF ( STRTONUM ( {Property:General Parameters/Element ID} ) > 0, SPLITLEFT ( {Property:General Parameters/Element ID}, "-", 2 ), "N/A" )

Otherwise it might be easier to export all ID's to excel and then filter there - or use the API?
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Many thanks Gerry. We tested it and it brought back the correct results bar some of the errors you mentioned in your post. We will amend the ID's to ensure they all have at least two dashes (including the ones we don't want to include) and ensure either they start with a number or a letter. This is forming the basis of our keynote system as well as the division of elements into schedule tables for the specifications.
Kind Regards,



Sebastian Monroe

Director/Architect



T: +61 3 9017 6666

www.codearchitecture.com.au

NOM ARCH VIC ARB: 17939

Archicad v26, Mac Mini INTEL 64GB, AMD Radeon Pro
Hi Gerry,

We used the expression in your post and it provided the schedule we were after. However when I exported the schedule to excel to fill out I received these errors. Does anyone have an idea how to solve this problem? We are stumped.
Kind Regards,



Sebastian Monroe

Director/Architect



T: +61 3 9017 6666

www.codearchitecture.com.au

NOM ARCH VIC ARB: 17939

Archicad v26, Mac Mini INTEL 64GB, AMD Radeon Pro
poco2013
Mentor
Without your narrowing it down to a specific element id that is causing the problem and what is the specific id text before and after --- can't help you - maybe some else can?
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Laszlo Nagy
Community Admin
Community Admin
The Help Center includes a section talking about possible errors when importing element properties:

https://helpcenter.graphisoft.com/user-guide/77258/#XREF_16106_Manage_Data_Errors

Check these and see if you can find the reason why those properties are not imported.

Sebastian wrote:
Hi Gerry,

We used the expression in your post and it provided the schedule we were after. However when I exported the schedule to excel to fill out I received these errors. Does anyone have an idea how to solve this problem? We are stumped.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac27
Learn and get certified!