How to exchange value from 2d script to parameters script
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-07-01 04:24 PM
2016-07-01
04:24 PM
In AC18 I used in 2d script:
GLOB_USER_1 = 10
and in paramerers script reads this value.
Now it's not working in AC19-20.
Help me, please!
How to simple pass a value from the 2d script into the parameters script?
Thanks in advance.
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-07-01 05:37 PM
2016-07-01
05:37 PM
Hi.
There were some changes in GDL for AC19-20 that affect what you are trying to do:http://archicad-talk.graphisoft.com/viewtopic.php?t=49395
Depending on what you need and trying to do (because of these changes in GDL), if the value is a common value or calculation to 2D script and parameter script, place it in the master script. No need to use global variables.
Best regards.
There were some changes in GDL for AC19-20 that affect what you are trying to do:
Depending on what you need and trying to do (because of these changes in GDL), if the value is a common value or calculation to 2D script and parameter script, place it in the master script. No need to use global variables.
Best regards.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-07-01 05:59 PM
2016-07-01
05:59 PM
In the course of the display in 2D (script execution) I have calculated the value of the variable.
I need this value to in the script parameters, to record its value in the parameter, so I could read it from my add-on.
Need something like this:
in the 2d script:
MyValue = 10
in the script parameters:
PARAMETERS MyParameter = MyValue
I need this value to in the script parameters, to record its value in the parameter, so I could read it from my add-on.
Need something like this:
in the 2d script:
MyValue = 10
in the script parameters:
PARAMETERS MyParameter = MyValue
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-07-01 08:00 PM
2016-07-01
08:00 PM
If it is a calculation, move it to the master script.
Master script:
MyValue = 10
2D script:
ADD2 MyValue,0 (or whatever you need "MyValue" for)
Parameter script:
PARAMETERS MyParameter = MyValue
Master script:
MyValue = 10
2D script:
ADD2 MyValue,0 (or whatever you need "MyValue" for)
Parameter script:
PARAMETERS MyParameter = MyValue
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-07-01 09:15 PM
2016-07-01
09:15 PM
I can't do this.
It's my situation:
In master script:
MyValue = 10
In 2d script:
... long long long drawing with calc needed value
MyValue = result_long_hard_calculations_during_drawing
In parameter script:
PARAMETERS MyParameter = MyValue
!but in result = 10, that was assigned in master script (not result_long_hard_calculations_during_drawing)
I can't do calculations doubly with GDL interpreter (it's more long time).
It's my situation:
In master script:
MyValue = 10
In 2d script:
... long long long drawing with calc needed value
MyValue = result_long_hard_calculations_during_drawing
In parameter script:
PARAMETERS MyParameter = MyValue
!but in result = 10, that was assigned in master script (not result_long_hard_calculations_during_drawing)

I can't do calculations doubly with GDL interpreter (it's more long time).

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-07-01 09:49 PM
2016-07-01
09:49 PM
I understand. That's what I'm trying to tell you: move the calculation part to the master script, leave the 2D drawing commands in 2D script. So if you have
In simple terms... change your script structure: make all the calculations you need and then draw based on those calcs. Unless you are making something that can't be done this way, then you would need to give more information, a screenshot, what the object is doing, or anything other than hypothetic examples.
Tsepov wrote:Move the "long long long calc" part to master script and leave the "drawing" part in the 2D Script. Does that make sense? If you calculate your variables in 2D Script you won't be able to use them elsewhere (for example, in 3D, even though your library part may not have a 3D script)
... long long long drawing with calc needed value
MyValue = result_long_hard_calculations_during_drawing
In simple terms... change your script structure: make all the calculations you need and then draw based on those calcs. Unless you are making something that can't be done this way, then you would need to give more information, a screenshot, what the object is doing, or anything other than hypothetic examples.
Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2016-07-02 10:02 AM
2016-07-02
10:02 AM
Code is too long.
Main point is that i need to calc to show the same on a 2d result and write it to parameter.
And calculations in main script slow down user work with object when hotspot editing and slowdown work my add-ons when i change more then 1000 paramerets of that object (subrotin in main script work any 1000 times).
Thank you, sinceV6!
I doplicate code on parameter script (in main script thay can't work).
I did another way.
I created parameter RefreshState and assign it to 1 from add-ons befor recalc all 1000 parameters.
In parameter script i put IF RefreshState... , and my calcs are work properly and no slow all.
Just 2 global variables had enough in AC18 to transfer value within one object scripts...
Else time Thank YOU!
Main point is that i need to calc to show the same on a 2d result and write it to parameter.
And calculations in main script slow down user work with object when hotspot editing and slowdown work my add-ons when i change more then 1000 paramerets of that object (subrotin in main script work any 1000 times).
Thank you, sinceV6!
I doplicate code on parameter script (in main script thay can't work).
I did another way.
I created parameter RefreshState and assign it to 1 from add-ons befor recalc all 1000 parameters.
In parameter script i put IF RefreshState... , and my calcs are work properly and no slow all.
Just 2 global variables had enough in AC18 to transfer value within one object scripts...
Else time Thank YOU!
