We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2011-04-09 07:44 PM
2011-04-10 11:31 AM
2011-04-10 04:13 PM
2011-04-10 04:33 PM
Jeffrey wrote:The whole point of SPLIT is to convert from string to number so the string aspect of the value will be lost. As long as the string is preserved in the original variable what is the problem?
Is there any way to prevent split from destroying the string?
The ultimate goal is to change it to a dimension.For this you will need to convert the extracted number (which I assume is in inches) to meters since this is what GDL uses internally. Something like:
wdth = SPLIT ("nmbrvl", %n, num) * 0.0254To later display this as a dimension would require STR with the appropriate format string.
2011-04-10 04:40 PM
2011-04-10 04:51 PM
wdth = SPLIT (nmbrvl, "%n", num) * 0.0254 (the quotes must be around %n) TEXT2 0,-0.4,wdthit returns 0.0254.
x = SPLIT (nmbrvl, "%n", num) oawdth = num * 12" TEXT2 0,-0.1,oawdthIf I calculate manually, the TEXT2 shows the correct result (in meters).
2011-04-10 07:59 PM