Choose your top Archicad wishes!

Read more
GDL
About building parametric objects with GDL.
SOLVED!

Library_Master for centralized data

s_p_b
Booster

I am writing a keynotes system based on text files loaded into the project library. I am curious if there is a way of centrally setting a value (or more specifically, an array), using the Library Master object, which could then be used by all my keynote markers? I am trying to avoid having my markers all repeat a potentially expensive use of the text I/O GDL add-on, and instead just do the work once upfront, and communicate it to the markers efficiently.

 

I've figured out that the Library Master object can do things like set value lists for a given parameter name, which is great, but this document suggests, in section IV, that we can also set values themselves:

To centrally set a value for all parts of a library:
- Use the Library Master object to set fixed values and value lists for all of your objects

- Use the Library Globals set in Model View Options to have editable parameters affecting all Library parts using that Model View.

Unfortunately I can't find any documentation on the 'set fixed values' part - how is this done? Is GS just referring to inline attribute definitions such as materials?


1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Barry Kelly
Moderator

I have (and still do) use MASTER_GDL files to set value lists, and if I want just a single value then that is all I put in the value list, just a single value.

I have not tried to simply set the value of a parameter.

I guess you could if you never want it to be different.

 

I have in the past used the GLOB_USER_1 to 20 parameters, but these don't work as they used to, so I stopped using them.

 

If I need to control a parameter, then I now use the LIBRARY GLOBALS.

This way you can set a parameter for a particular reason, user can change it if need be (without having to edit a MASTER_GDL script and re-load the library), and you can even save different values in different Model View Option schemes.

Still not perfect as you have to edit each MVO scheme individually if you want them all to be the same values.

We really need a UNIVERSAL GLOBAL as I have suggested before.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

3 REPLIES 3
Solution
Barry Kelly
Moderator

I have (and still do) use MASTER_GDL files to set value lists, and if I want just a single value then that is all I put in the value list, just a single value.

I have not tried to simply set the value of a parameter.

I guess you could if you never want it to be different.

 

I have in the past used the GLOB_USER_1 to 20 parameters, but these don't work as they used to, so I stopped using them.

 

If I need to control a parameter, then I now use the LIBRARY GLOBALS.

This way you can set a parameter for a particular reason, user can change it if need be (without having to edit a MASTER_GDL script and re-load the library), and you can even save different values in different Model View Option schemes.

Still not perfect as you have to edit each MVO scheme individually if you want them all to be the same values.

We really need a UNIVERSAL GLOBAL as I have suggested before.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

Thanks - I think you're right that allowing the user to select a different source of keynotes per MVO is actually very useful so I will go with the Library Global. The user picks the file, and a set of hidden array type parameters get filled up with the results.

 

There is another method I found - any inline attribute definition (i.e. DEFINE MATERIAL...) allows you to save key-value pairs using the ADDITIONAL_DATA option, of any data type, even arrays! These can then be retrieved with a REQUEST{2} "MATERIAL_INFO"... command. It does require a library reload to update, but if a few library objects need a centralized data store that doesn't need user input, this works ok, but at the cost of introducing potentially unwanted attributes.

MVO sets can be multi-selected, and parameters can be changed without affecting others. I am not sure about individual elements of an array.

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

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!