2021-10-08 12:37 PM - edited 2021-10-08 12:38 PM
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.
2021-10-08 02:05 PM - edited 2021-10-08 02:07 PM
Maybe library global is the key? some update button there?
So the original content in csv...loads on demand and updates the content...
or even plain edit it as You have the UI...and UI in LG can be natively bigger 😛
2021-10-08 02:19 PM
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.
2021-10-08 03:07 PM
In my case, putting the values in the caller defeats the whole purpose. Piotr idea just nails it
2021-10-13 06:48 AM
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.
2021-10-19 08:02 AM
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)
2021-10-21 03:15 AM
Excellent, thanks for the explanation Piotr. I'll give these ideas a go in my next attempt.