cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

2024 Technology Preview Program:
Master powerful new features and shape the latest BIM-enabled innovations

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

Split Command

Erich
Contributor
Hey folks, I am trying to parse a string output into useable numbers and need a little help.

The string, "dep", is of variable format and can contain numbers such as 7-1/2 or 9 or 10-1/2.

So far I have the following command:

nvars=SPLIT (dep,"%n-%n/%n",nx,ss3,ny,ss4,nz)
IF nz<>0 THEN b=1"*(nx+ny/nz)/2 ELSE b=nx*1"/2

This works great provided that the string for "dep" is represented by a single digit or by the five place format such as 7-1/2. However, when I get to values for "dep" such as 10-1/2 the SPLIT command breaks down for me and will result in a value of 10" not 10 1/2". How can I change this to work right?

I am sick today so this is probably staring me in the face and I just can't see it.


(edit)=============
I found it this morning. It was not that the GDL sytanx was wrong but that I changed the format of my values part way through by forgetting the dash. So the values changed from "XX-X/X" to "XX X/X".
Erich

AC 19 6006 & AC 20
Mac OS 10.11.5
15" Retina MacBook Pro 2.6
27" iMac Retina 5K
0 REPLIES 0