BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

GDL
About building parametric objects with GDL.

Sensing the MVO change

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

13 REPLIES 13

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.

Péter Baksa
Software Engineer, Library as a Platform
Graphisoft SE, Budapest

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
- AC-24 FIN - WIN 10 - HP Zbook -
“A winner is just a loser who tried one more time.”
George M. Moore, Jr.

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  😜

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

 

Learn and get certified!