Basically Archicad automatically recognizes if the input is a number or a text and sets the variable type.
In my experience if you work with simple variables (not arrays) you have to initialize them correctly - if you do sheetscale="" and then use it in an input command which returns a number, Archicad changes it to a number but somehow gets confused and returns errors.
So either use sheetscale=0 when you expect numbers, do a "if vartype then split" or use arrays.
Thank you so much for responding. After reading your posts, I realise I can't use a *txt file for both numbers and text when importing into Archicad as it has trouble distinguishing 0 null. I wonder how I could go about this problem:
I would like to reference a list of GDL child part names to CALL i.e.
GDL Object Child Names
And for these GDL child part names, each would have a reference parameter such as an offset, or length that changes depending upon the part selected i.e.
Is there a way to create something like a lookup table (like Excel), where the first values list selects the child object, and then, based on the selected child object, parameters in the Main (Parent) object change accordingly?
Do you know of any links or scripts or example GDL objects that I could study for this too?
I agree with Peter; the XML add-on is the way to go.
I have been using this add-on for 6 or 7 years now and it is how I enable an internal catalogue where the parameters are locked to values in an XML file.
With TXT file you are selecting a specific cell based on it position, whereas with XML you a searching for a key/value pair which is far more intelligent, reliable and flexible.
In the early days I struggled to work it out and there was no documentation on the tool apart from the GDL Reference Guide. The difficult bit was understanding how to "traverse the XML tree". I eventually worked it out with some help from the experts at GSHQ, who as a result, created more detailed documentation on the "GDL Center". Do a search for XML and you find the information you need.
Creator of Cadswift's parametric GDL libraries
Creator of Infinite Openings and Component Catalogues
Push the envelope & watch it bend