We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Q: Can GDL objects pass/exchange parameters?

Anonymous
Not applicable
Hi,

I never came across any references to this -

Can GDL objects be made to pass and exchange parameters
between themselves?


That could translate into something like:

If Table XX is set to "White Wood", then other
furniture objects of series XX will AUTOMATICALLY
set themselves to "WHITE WOOD" too.

or:

One creates a "Lever" Object, which when "moved"
(by stretchy hotspot, 2D/3D) - send a command to
a selected OTHER object to rotate, or move or something.

?
4 REPLIES 4
Ralph Wessel
Mentor
Gil wrote:
Can GDL objects be made to pass and exchange parameters between themselves?
An object can call another object and pass parameters to it, but this takes place within the context of a single object instance. There is no mechanism for one object instance to pass parameters to another instance. It is possible to do this through the ArchiCAD API, but that's another story...
Ralph Wessel BArch
Software Engineer Speckle Systems
Barry Kelly
Moderator
You can have a master object that saves the parameters you want to an external text file.
Then all the other objects can be made to read that text file and adjust accordingly.

You can also do it using the internal GLOB_USER variables so you don't need to read and write to the text file.
You need to be careful that no other library parts use the same GLOB_USER variables for other purposes and there is only a limited number of them.

Actually with 14 (and I think 13) you can now use the customisable Model View Options using the LIBRARYGLOBAL command.

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Barry, Ralph -
Thanks, that's along the lines of what I thought could be done.
It would create an impossible mess for the concept I was
toying with.

Oh well, guess that comes with the territory 🙂
Gil
Ralph Wessel
Mentor
Barry wrote:
You can have a master object that saves the parameters you want to an external text file.
Then all the other objects can be made to read that text file and adjust accordingly.
You can also do it using the internal GLOB_USER variables so you don't need to read and write to the text file.
These are all global methods, i.e. a change is propagated to all instances. This doesn't mean every instance has to respond to the change, but the data is broadcast globally nonetheless.

I think the mechanism sought here was more fine-tuned,e.g. a specific object moving in response to another object moving. GDL doesn't provide for this kind of inter-object communication.
Ralph Wessel BArch
Software Engineer Speckle Systems