Extracting GDL calculated values
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-17 05:25 PM
2012-09-17
05:25 PM
I am able to get the values that I am able to INPUT in the GDL object with no problem, but not the ones that the GDL code establishes for me.
4 REPLIES 4

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-18 03:55 AM
2012-09-18
03:55 AM
If I understand correctly then your GDL object needs to save the calculation as a Parameter in the parameter list of the object.
Then in your schedule you can list the "Additional Parameters".
You can lock them in the GDL object so the user can't modify them - not that they would modify as they should revert back to the calculated value if scripted properly.
Locking them just means users won't get frustrated when they can edit them but the values dont change.
Barry.
Then in your schedule you can list the "Additional Parameters".
You can lock them in the GDL object so the user can't modify them - not that they would modify as they should revert back to the calculated value if scripted properly.
Locking them just means users won't get frustrated when they can edit them but the values dont change.
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-18 04:06 AM
2012-09-18
04:06 AM
Thank you for helping. I have tried creating a variable in the Parameter list and then assigning a value to it in the body of the 2D code, no luck that I can tell changing the value.
To be sure you understand an example of what I am trying to do. A GDL Object draws a box that is X grids wide and Y grids long. The grid sizes are assigned in the Parameters input setting along with the of the number of grids. I can calculate the area of the box by multiplying all the numbers together. I can assign that value to a variable in the GDL code. I can have that value written out on the Object with the TEXT2 command, but I can not find a way to access the value in a SCHEDULE. Additional Parameters only allows me to access those variables that are defined in the Parameters list.
To be sure you understand an example of what I am trying to do. A GDL Object draws a box that is X grids wide and Y grids long. The grid sizes are assigned in the Parameters input setting along with the of the number of grids. I can calculate the area of the box by multiplying all the numbers together. I can assign that value to a variable in the GDL code. I can have that value written out on the Object with the TEXT2 command, but I can not find a way to access the value in a SCHEDULE. Additional Parameters only allows me to access those variables that are defined in the Parameters list.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-18 07:18 AM
2012-09-18
07:18 AM
You can't modify parameter values in the parameter list from the 2D or 3D scripts.
Do the calculations for the area in the Master or Parameter script.
Then use "PARAMETERS area = area" to asign the calculated value to the area parameter in you parameter list (you will need to create the parameter in the list).
You can still use this parameter value in your TEXT2 command in the 2D script (no need to recalculate it there again).
Barry.
Do the calculations for the area in the Master or Parameter script.
Then use "PARAMETERS area = area" to asign the calculated value to the area parameter in you parameter list (you will need to create the parameter in the list).
You can still use this parameter value in your TEXT2 command in the 2D script (no need to recalculate it there again).
Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2012-09-18 05:22 PM
2012-09-18
05:22 PM
After a little translating your explanation for this Cow Boy Texan, I figured it out and it works great. Thanks for the help partner.