BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Changing strings to numerical values

Andrew Swenson
Newcomer
I am trying to use the Global ID to input the starting number of a counter I have in a carpark object. So that I don't have to open up the object settings everytime I want to change the start number.

I understand that the Global ID is a string but I need to have a numeric value to use as a counter.

Is there a way of changing the Global ID value from a string type to a numeric type?
ArchiCAD 5.1 - 24
MSI WS63 8SL
Intel i7-8850K @ 2.60GHz
32Gb RAM
Windows 10 Pro 64bit
TwinMotion 2020.2
3 REPLIES 3
Frank Beister
Advisor
I am trying to use the Global ID to input the starting number of a counter I have in a carpark object. So that I don't have to open up the object settings everytime I want to change the start number.
So I have done in mine.

You have to use the SPLIT command:
FLAG=request("ID_of_main","",NRT)
FLAG=split(NRT,"%n",NR)
if strlen(NRT)>strlen(str("%.0",NR)) then FLAG=0
FLAG is a boolean, returning, if the GLOB_ID is an integer>0 or not. NR contains the number.
bim author since 1994 | bim manager since 2018 | author of selfGDL.de | openGDL | skewed archicad user hall of fame | author of bim-all-doors.gsm
Andrew Swenson
Newcomer
Thanks I will give it a try.
ArchiCAD 5.1 - 24
MSI WS63 8SL
Intel i7-8850K @ 2.60GHz
32Gb RAM
Windows 10 Pro 64bit
TwinMotion 2020.2
Andrew Swenson
Newcomer
Well that worked! Thanks for the help.
ArchiCAD 5.1 - 24
MSI WS63 8SL
Intel i7-8850K @ 2.60GHz
32Gb RAM
Windows 10 Pro 64bit
TwinMotion 2020.2
Learn and get certified!