Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

How to save Macro’s new values after closing the dialogue and without placing it in the model?

Nader Belal
Advisor

Hi everyone,

 

This question is expected to be answered by professionals GDL programmers only.

 

Case:

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.

 

Desires:

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?

 

 

A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.
1 ACCEPTED SOLUTION

Solution

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  😛

View solution in original post

6 REPLIES 6

Solution

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  😛

View solution in original post

Barry Kelly
Moderator

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.

 

Barry.


One of the forum moderators.
Versions 6.5 to 25
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Dell Precision 3510 - i7 6820HQ @ 2.70GHz, 16GB RAM, AMD FirePro W5130M, Windows 10

@Barry Kelly 
In my case, putting the values in the caller defeats the whole purpose. Piotr idea just nails it

A good friend of mine have once told me that I´m so brute that I´m capable of creating a GDL script capable of creating GDLs.

JaseBee
Booster

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.

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

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)

JaseBee
Booster

Excellent, thanks for the explanation Piotr. I'll give these ideas a go in my next attempt.

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

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!