Trim Text in an Expression

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-09-16 04:20 PM
‎2019-09-16
04:20 PM
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
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
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics
Labels:
- Labels:
-
Data management
3 REPLIES 3

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-09-16 05:27 PM
‎2019-09-16
05:27 PM
Well I got it to work but not in a clever way that can cope with having longer or shorter Composite names
So if anyone has sussed how to do that then I would be very grateful if you could let me know how
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
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-09-16 09:18 PM
‎2019-09-16
09:18 PM
SPLITLEFT ( {Property:General Parameters/Composite Structure}, "-", 1 )
Gerry
Windows 11 - Visual Studio 2022; ArchiCAD 27
Windows 11 - Visual Studio 2022; ArchiCAD 27

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2019-09-17 09:25 AM
‎2019-09-17
09:25 AM
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
Using AC25 5005 UKI FULL
Mac OSX 10.15.7 (19G2021) Mac Pro-2013 32gbRam AMD FirePro D500 3072 MB graphics