Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Library Globals and Object Updates in v19

JaseBee
Advocate
Hi guys, this is my first post after thoroughly using this forum to learn some GDL, super helpful!

I have a query about the Library Globals (MVO's) and getting them to talk to objects.

It seems that placed objects are not following the changes represented in the library global until the object parameters have been modified somehow.

For example, I have an object that gets an override pen from global settings, it receives whatever pen is set in the global, but only applies it upon alteration of the object (like dragging an editable hotspot or changing the global ID).

I can't figure it out (being relatively new to GDL), I found Graphisoft 19 documentation that says the 2d and 3d scripts are run when views are refreshed, which is where I put the override global call, I even went to the trouble of recreating a separate HVAC/Electrical display option global (because I've had success tying other objects into this parameter and they update automatically) but it produces the same result.

Anybody have any ideas? I'm just about to give up and mush all the objects into the standard MVO options but i'd like to avoid this as it's messy and not very clear for the user...
AC 24 5004 AUS
iMac OSX (10.13.6) 4.2ghz i7
8gb ram/8gb vram
3 REPLIES 3
sinceV6
Advocate
Hi.
It would greatly depend on how you scripted both your object and your library globals, i.e. how your script checks MVO, assigns the value and uses it.

I put MVO checks in Master script.
A little more info and there might be more specific help.
Best regards.
JaseBee
Advocate
I started off with my head in the clouds hoping to have a global array of values for each parameter so the object would request the global array from the library global file based upon a grouping parameter...

DIM Gpens_A[]
pens_ = LIBRARYGLOBAL ("AltoGlobalSet", "Gpens_A", Gpens_A)
PARAMETERS gs_cont_pen = Gpens_A[name_CI]

Also tried just 'gs_cont_pen = Gpens_A[name_CI]' (no 'PARAMETERS' write)

Then it would apply the value from the array based upon its current group index (name_CI) that it gathers running a 'for-to-next' check on the selected name and the master list (also a requested global array).

So you select a group for you object and it always goes to the same index of each global parameter array for it's values.

all the requests for the arrays were in the master and parameter script (I didn't know where I should put them so doubled up).

I had some issues with the arrays saving the values in the MVO but the values were getting across to the object once entered in the array, so the gs_cont_pen was taking on the Gpens_A[name_CI] value, but only after I made any change to any object parameter. (forcing a refresh of the object)

It produced the same result when I 'dumbed' everything down so that there were no arrays and was just requesting value of a single value parameter.

Not sure if this is new information or just saying the same thing slightly differently, thanks for the initial response, hope I've made it somewhat clearer.

Jase.
AC 24 5004 AUS
iMac OSX (10.13.6) 4.2ghz i7
8gb ram/8gb vram
JaseBee
Advocate
Sorry to waste anyones time with this, it seems that retyping all from scratch in 19 fixes the problem.

By way of compensation I'll upload the test files.

I think they should allow you to hyjack any objects parameters with a global override, with a call at the start of the script and some on off parameters.

Thanks Gang!

Jase
AC 24 5004 AUS
iMac OSX (10.13.6) 4.2ghz i7
8gb ram/8gb vram