This question is expected to be answered by professionals GDL programmers only.
I have created a macro that should act as data repository, instead of using Archicad’s database or text I/O plug-ins for practicality reasons. And that macro would output to the caller library part a specific set of data that is to be provided by the caller library part.
The problem that I’m facing is that in case that if the user wants to update the macro’s data values, s/he would need to open it using the GDL Editor, modify the values (UI is provided), then save it/overwrite it.
I would like to know if there is a way, that the user would only have to edit those values using library parts, and they would automatically be saved, without the need of placing that macro in the plan or in the model?
Solved! Go to Solution.
A macro can be a place-able library part, but when called from another library part, it will not call the placed instance, it will call the default macro in the library - with its default values.
So the only way to change values in that macro object is to open and edit the library part (macro) itself.
But if it is a macro, you could have the parameters in the master object that makes the call.
It will pass those values on to the macro with the call, so there is no need to modify and save the actual macro.
You just set what you want in the master object.
That way each instance of the master object can have its own settings.
But I get the feeling that may not be what you want.
As Piotr suggested, you could create Library Global variables in the Model View Options.
You can set the value in the MVO and all objects can read it.
Do you find that utilising the library global as a database slows things down?
Last time I tried to store lots of values as a sort of master set for numerous parts in a library global it seemed to get clunky.
Sorry to chime in after it's been solved, have been toying with ways of getting objects to talk to each other for some time.
Depends how big is the database...have in mind that the matrix parameters passing has some restrictions.
I use it for changing the library language on the fly.
There may be a slowdown loading MVO - but it happens when there are a lot ui_infields for parameters visible. (I sometimes do a command to open edit to get it faster)