We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

GDL
About building parametric objects with GDL.

Help, label GDL, dynamic array

Anonymous
Not applicable
Hello, i am learning GDL, so i dont know how to resolve this:
Please someone could help me.

I am creating a laber in GDL, this is a table of dates, for example for 1 slab, i want to input data of the concrete in work for control of quality.
i have 3 problems until now,
attached pictures of the description of each one.

problem 1


problem 2


problem 3


Thankyou
9 REPLIES 9
Jochen Suehlo
Moderator
Problem 3: As far as I know, you cannot list Array Parameters

Problem 2: You can resize the User Interface, if you like (UI_DIALOG "Settings", 600, 1200 for example).
Or you can code a kind of slider.

Problem 1: was not clear for me, what you meant.
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Anonymous
Not applicable
Thanks a lot, for your help.

More infrmation.

Problem 1:
For create this date table, i used a dynamic array for each colum, all array is created in GDL, declared qith DIM and initialized assigning a value (any value, only for initialize the parameter), until here all is ok.

I used UI_INFIELD for create the user interface, and allow the user of the laber insert values diferents.

the problem: when the user write values in the fields created with UI_OUTFIELD, everything the user writes is discarded and automatically returns to the value assigned by the GDL.

SO, How do I make the values entered by the user in the cells created with UI_INFIELD be saved, and not be discarded by the script?


Problem 2: This (UI_DIALOG "Settings", 600, 1200) help a lot, thanks
Any idea for code of scrollbar?, i looked in GDL cookbok and GDL hand book and nothing.

Problem 3: if i can not report the arrays values, any idea, How to report or print or export this data table?

Thanks a lot for your help.
Jochen Suehlo
Moderator
Problem 1:
Array Parameters you must not declare in the script.
You only need to declare them if you want to lower its size.
And it make sense to do it once if you have bigger Arrays, that saves a lot of manual work.
But after that declation you should uncomment this script part.
If you have not declared the Array in the Parameter-Script (or uncommented it), the user should be able to
change the values.

Problem 2: I can look for an example I have made some years ago, please give me a day.

Problem 3: at the moment not...
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Jochen Suehlo
Moderator
Here is a simple scrolling example with buttons and with UI_Slider.
The buttons have "end stops", the Slider not yet.
http://download.b-prisma.de/objekte/Scrolling_in_UI.gsm
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Anonymous
Not applicable
Thanks for your help, now just need to solve the problem 3.
Thanks a lot
Jochen Suehlo
Moderator
Problem 3: Have you tried to use Text or Data Addon?
Both are described in the GDL Cookbook.
You can export Textfiles via GDL script.
But I am not shure, if this solves your problem.
Jochen Suehlo . AC12-27 . MAC OSX 14.4 . WIN11
GDL object creation: b-prisma.de
Nader Belal
Mentor
@Andomar

These 3 problems deserve 3 seperate posts alone ...

Anyway,

1. Arrays in the Parameters Tab are dynamic in nature, you don't need to declare a specific value for its size. Althought in your case you can make the array[1], were X is it's width size. And if you need another row, just create a ui_button script that if the user clicks on it, it would just add a new row to the array with some bogus values, the user can change them.

Why should you do it that way? In your case, simple:
a. The bigger the array the bigger memory required for your object.
b. You will not have to deal with the rest of the arrays unused data.

2. I believe @Joachim Suehlo have already answered you.

3. Do you need to list all object's data ? (May be a work around can be enacted).
A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
Anonymous
Not applicable
Thank you for you answer.

Problem 3. Yes, I need to list all the values, it should be like an Excel data table (but inside the model), to record information about the construction process.
Anonymous
Not applicable
Hello everyone, I am trying to rewrite the script with less coding.
I am trying to initialize a dynamic array from UI_INFIELD, but it doesn't work, how should I fix this?
I am attaching the second attempt.
The error is that the dynamic array in the columns does not work
Thanks.