GDL
About building parametric objects with GDL.
SOLVED!

Exposing Variables

DGSketcher
Legend
I have a fairly complex GDL object containing a number of parts which I want to analyse for quantities. I have a collection of Dictionary values which are populated in the 3D script as the model assembles the parts. I can summarise the variables from the Dictionary values to give the right totals etc, so I now have a variable in the 3D script e.g. "MyTotal". I also have a Parameter set up "MyTotal" but the associated value always shows zero.

Question: How do I get the calculated "MyTotal" present in the 3D script to display in the parameters so that I can use it in labels & schedules?
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
runxel
Legend
Sadly, you can't directly do that.
You would need to make a scheduable parameter and write the info from the dict to that.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

View solution in original post

4 REPLIES 4
Solution
runxel
Legend
Sadly, you can't directly do that.
You would need to make a scheduable parameter and write the info from the dict to that.
Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»
DGSketcher
Legend
Thanks, I had a feeling it may not be possible. Rewrite in progress...
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)
Barry Kelly
Moderator
DGSketcher wrote:
Question: How do I get the calculated "MyTotal" present in the 3D script to display in the parameters so that I can use it in labels & schedules?

I am not 100% clear on what you are doing, but can you do all the calculations in the Master script rather than the 3D script?
The 3D can still use all of these calculations and in the master script it is possible to save the values to parameters.


Barry.
One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
DGSketcher
Legend
Thanks for the suggestion Barry. Despite many years doing little things in GDL I am still learning, not only what works where but how best to structure things. What was a simple 3D parametric model has gained greater purpose and now needs to deliver data for analysis, which needs a different approach. All good, new skills and rewritten 3D model in development...

And for anyone else asking the same question, in order to expose a variable through the Parameters it needs to be set in the Master Script or manipulated in the Parameter Script.
Apple iMac Intel i9 / macOS Sonoma / AC27UKI (most recent builds.. if they work)