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 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...
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.
From the manual: Visible placed objects whose 2d or 3d scripts contain LIBRARYGLOBAL commands are refreshed when the library global object’s parameters change at Model View Options. Parameter and migration scripts should not use LIBRARYGLOBAL values, the current view should not have any effect on other views.
Also parameters of an object are directly accessible for listing, so they mustn't depend on the current MVO.
You should be able to read the same data from 2d and 3d scripts.
This tread gives me an impression, that the Libraryglobal works in 2d and 3d only.
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_.
If Param_a#Param_a_ then modparname="Param_a"
parameters modparname=modparname, Param_a_=Param_a
I have not tried this method in Your case but this problem is interesting.
Found in GDL manual AC24, maybe they give some idea.
page 261: In addition, the global string variable GLOB_MODPAR_NAME contains the name of the last user-modified parameter. -does this cover the program-modified parameters too?
page 298: • LIBRARYGLOBAL requests cannot return dictionary type values.
page 560: When resetting the value of a parameter in a certain condition in the Parameter Script using the parameters command, a similar statement must be put into the Master Script. This keeps the object's display correct in cases when the parameter script is not run by the system. E.g.:
! parameter script if bCondition then yy = 1 parameters yy = yy endif ! master script if bCondition then yy = 1