‎2022-09-29
08:21 PM
- last edited on
‎2025-01-30
10:37 AM
by
Aruzhan Ilaikova
I am trying to use an expression to do basic string handling on the Building Material All property
SPLIT(Building Material, "-", 2)
also tried SPLITLEFT & RIGHT
this does not generate an error and it does not work.
Any Thoughts??
Thanks
‎2022-09-30 12:34 AM
As long as you choose "String" as the data type, shouldn't be a problem
‎2022-09-30 09:40 AM
@gdford could it be that your delimeter is set to 2? Meaning that it will split after the second “-“ that it finds? This would be display ‘CCC’ in the following building material: AAA - BBB - CCC.
If you wanted it to display BBB you would need to use SPLIT and set the delimiter to 1, or SPLITLEFT if you wanted AAA.
If it’s neither of the above, perhaps share a screenshot of your property expression and the building material name that you have set.
‎2022-09-30 01:36 PM
That expression only works with single Building Material elements. If you wanted to split and return a part of all BM names from multiple BM elements such as Composites then there's another way to do it.
Architect | Graphisoft Certified BIM Manager
ArchiCAD 29 JPN/USA/INT | Windows 11
‎2022-09-30 02:32 PM
Just by adding the rules as a sequence I assume?
‎2022-09-30 04:34 PM
Interesting - I will give that a look see.
Thanks!
‎2022-09-30 04:35 PM
yep - I tried setting it to 0, 1, and 2 - none of that works
‎2022-09-30 05:36 PM
SPLIT(Building Material ..... does not work - the other examples do work
‎2022-10-03 03:50 AM - edited ‎2022-10-03 04:08 AM
Your expression [SPLIT(Building Material, "-", 2)] should work only when the element is made of a single building material, otherwise it wouldn't.
Architect | Graphisoft Certified BIM Manager
ArchiCAD 29 JPN/USA/INT | Windows 11