Home › Forums › Problems and solutions in GDL › Graphical UI and parameters list › append current value to the list with ui_button
Tagged: ui, parameters, append, button
- This topic has 6 replies, 3 voices, and was last updated 7 years, 2 months ago by Gergely Fehér.
-
AuthorPosts
-
-
August 18, 2017 at 15:02 #3478Maciek BajorParticipant
Hello,
I wonder if somebody could help me with my problem. I have added several fields to the layout info and I am reading these from my object (from LAYOUT_REVISION_HISTORY).
Now I would like to have a button to append current values of these fields to some array and display them.
I try to find a way to trigger action of appending current value to the list from UI. Is it possible to trigger some macro from interface or parameter script that would append current value? Also I want to store this array within gdl object rather than write to file.
Thank you for help,
Maciek
-
August 21, 2017 at 15:53 #3481Maciek BajorParticipant
Related question: Is there a way in GDL to check if some variable changed its value?
-
August 21, 2017 at 16:25 #3482Gergely FehérKeymaster
You should not store any values, as they can be changed without running the object’s paramscript.
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE -
August 22, 2017 at 13:38 #3493Maciek BajorParticipant
Gergerly – that’s fine I didn’t want to have real-time values.
If anybody wondered – I ended up up with attached script (will append first custom field from layout info). Need to make these buttons work nicer but it works.
Previous question: Is there a way in GDL to check if some variable changed its value?
There is GLOB_MODPAR_NAME but returns null after you click UI_Button.Attachments:
-
August 23, 2017 at 02:07 #3495Barry KellyParticipant
I think GLOB_MODPAR_NAME might only work in the Master or Parameter scripts, not the UI script.
Barry.
Versions 6.5 to 22
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision M6800 - i7 4700MQ @ 2.40GHz, 16GB RAM, AMD FirePro M6100 (2GB), Windows 7 64bit -
August 23, 2017 at 08:12 #3498Maciek BajorParticipant
Yes I think so too. Probably worth to mention common workaround – Create global variable var and then in parameter script write
parameters var = GLOB_MODPAR_NAME
than you can reference to var in Master and 2D. In case anybody wondered – because that is not intuitive at all. -
August 23, 2017 at 09:51 #3499Gergely FehérKeymaster
Value of GLOB_MODPAR_NAME should not be stored in a parameter… It is not a core data of an object.
Gergely Fehér
Team Leader, Library Team
GRAPHISOFT SE
-
-
AuthorPosts
- The forum ‘Graphical UI and parameters list’ is closed to new topics and replies.