3 weeks ago
Hello,
I have a string that defines the size of an opening 100x240. How can I extract the two numbers from this string so that I can calculate the area of the opening? I can solve it with text functions in the case of properties, but I can't do it in the case of GDL code.
Can anyone help with this? Thanks in advance for your help.
Gábor
Solved! Go to Solution.
3 weeks ago
It should be something like this ...
text_string = "100x240"
n = SPLIT (text_string, "%nx%n", size1, ss2, size2)
PRINT size1, ss2, size2 !!! 100 x 240
You may need to do further conversion to get the sizes into the unit of choice so you can get the area in the correct unit of measurement you need.
Barry.
3 weeks ago
It should be something like this ...
text_string = "100x240"
n = SPLIT (text_string, "%nx%n", size1, ss2, size2)
PRINT size1, ss2, size2 !!! 100 x 240
You may need to do further conversion to get the sizes into the unit of choice so you can get the area in the correct unit of measurement you need.
Barry.
3 weeks ago
Thanks Barry,
I tried something similar but for some reason it didn't work... ☹️
I hope it works this way!
Thank you again.
Gábor