Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Convert from string to length

JGoode
Advocate

Hello,

 

is it possible to convert a string to a length?

 

Thanks

ArchiCAD 23

Windows 10
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
DGSketcher
Legend

In GDL yes. Look up the obviously named SPLIT command. 🙄 To be fair it does a good job, it's just not as immediately obvious as something like "StrToNum" which doesn't exist.

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)

View solution in original post

3 REPLIES 3
Solution
DGSketcher
Legend

In GDL yes. Look up the obviously named SPLIT command. 🙄 To be fair it does a good job, it's just not as immediately obvious as something like "StrToNum" which doesn't exist.

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
DGSketcher
Legend

... Unless you were after the length of the word on screen which is STW, or the number of characters which is STRLEN?

Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)

Thank you very much! I was aware of the SPLIT command but didn't know that it achieved what I was after.

ArchiCAD 23

Windows 10