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-13 06:03 PM
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.
2021-12-18 04:49 PM - last edited on 2021-12-19 05:17 PM by Laszlo Nagy
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
2021-12-20 08:45 PM
I have to completly rebuild the triggering system... glob_modpar_name...fails in some situations...some user changing parameters trigger database reload...while others do not...restart of playing detective 😜
2022-09-12 10:22 AM
Haha...
It took me quite a time to test this ideas (until my data import caused some errors due to the textual parameters...and caused me treating the database in powershell first to get a numerical chart)
Anyway it works, however it has to be done in a correct order.
(all in parameter script)
1. compare the library global loaded parameter with the local
2. if they do not match trigger the update and all needed code
3. use parameters command to update the parameters that came from library global
and the point 2 was partly a success...because this part must be in the beginning and some values are not calculated yet...anyways I managed to do a dummy update which then was compared and triggered the final one.
Anyway LibraryGlobal can trigger some data reload inside the treated object