2021-12-01 08:40 PM
Hi,
Have anyone found a way to sense in the object that the MVO changed?
looking for request like thing...because the change of parameter by LIBRARYGLOBAL does not produce any trigger to GLOB_MODPAR_NAME.
Piotr
2021-12-02 10:16 AM
Example
2021-12-02 10:20 AM
OK, a little misunderstanding.
I want something else could sense MVO change. I have a database (csv) hooked up with some data. I made some GLOB_MODPAR_NAME's that trigger the database reload. MVO change, even if the parameter that comes from LIBRARYGLOBAL changed do not trigger the reload.
Piotr
2021-12-02 10:32 AM
oh...not so sure if I can help...
Have you tried placing a dummy object to "trigger" with the same code of the GLOB_MODPAR_NAME?
2021-12-02 05:35 PM
@Piotr Dobrowolski Are looking for an MVO change trigger? I place the following code in the Master Script of my GDL objects and get consistent change response across all placed objects.
It doesn't seem to work in other scripts. If your object Master Script detected a changed state for Param1 e.g. Param1 <> Param2 then you could possibly use that to trigger a reload?
chk = LIBRARYGLOBAL ("My_MVO_Macro", "My_MVO_Param1", _reqParam1)
Param1 = _reqParam1
PARAMETERS Param1 = Param1
If anyone else is looking for guidance on linking to MVO settings this link may help...
http://gdl.graphisoft.com/tips-and-tricks/custom-made-model-view-options-object
2021-12-02 05:45 PM - edited 2021-12-02 05:50 PM
I do have such thing, but I have it a little different:
chk = LIBRARYGLOBAL ("My_MVO_Macro", "My_MVO_Param1", Param1)
PARAMETERS Param1 = Param1
And it does not work...GLOB_MODPAR_NAME does not trigger...
I tested with the parameter equaling...and it does not change anything
maybe it is because I load the database in the parameter script...I will investigate further.
Piotr
2021-12-06 09:08 PM
https://gdl.graphisoft.com/forums/topic/libraryglobal-mess-up
This tread gives me an impression, that the Libraryglobal works in 2d and 3d only.
2021-12-07 06:47 AM
Not only - I successfully use it for exchanging the translation strings, and passing some region specific data... The only drawback is limited no of entries and the problem in this tread 😉
(You can see how it works in Velux library BO will have latest ver. soon)
2021-12-07 08:06 AM
Ok.
I have used another method to find out the last modified parameter: I create a "shadow" parameter like Param_a_ for Param_a. When Param_a is changed, then there is a
difference between Param_a and Param_a_.
Parameter script:
modparname=""
If Param_a#Param_a_ then modparname="Param_a"
parameters modparname=modparname, Param_a_=Param_a
endif
I have not tried this method in Your case but this problem is interesting.
2021-12-07 09:52 AM
I Will try it... Implementation of more and more database features becomes more and more complicated 😉 (database csv is ~60x~7000 cels and keeps growing ;P)