We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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.

Trim Text in an Expression

fuzzytnth3
Booster
I want to create a Property so I can Label some Composite Walls but I would like to "Trim" off a Revision Number. We add to our Composite Names (the Rev Number lets us know we are using the most recent version as we have a number of Models using a number of Modules)

So for example our Composite name is "LIN_01a-02" where the "-02" is the Revision Number. So I want an Expression that trims off the "-02" and displays a result of "LIN_01a"

I've tried various Text function but ArchiCAD kicks up the message below

https://my.pcloud.com/publink/show?code=XZhyQHkZRJA5E5af6DksA2LIrKss57pSlguy

Any idea how I can get this to work?
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
3 REPLIES 3
fuzzytnth3
Booster
Well I got it to work but not in a clever way that can cope with having longer or shorter Composite names
LEFT ( Composite Structure, 7 )
The above works but only if the Composite name is 7 characters long. What I would like to do is be able to look for the Hyphen in the Composite name and display everything to the left of the Hyphen. I remember you can do this with IFC properties but I've not managed to get Expressions to work like that.

So if anyone has sussed how to do that then I would be very grateful if you could let me know how
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
poco2013
Mentor
SPLITLEFT ( {Property:General Parameters/Composite Structure}, "-", 1 )
Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
fuzzytnth3
Booster
Brilliant thank you that is exactly what I was after
AC versions 3.41 to 25 (UKI Full 5005).
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics