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

Relations betwwen gsm objects

Cosminn
Booster
Hello everyone

Is there a way for an object to read parameters from other object from the floor plan?

In other words,

For example let's say I have 2 objects, we call them:

Object_1 and object_2.

Object_1 has a parameter.
Parameter name is param_1, and parameter type is, let's say -length-.
As a default value we can set 1.50.

Object_2 has a parameter as well.
Parameter name is param_2 and the type is also -length-

We place both objects on the floor plan.
And my question is:

Can I create a new parameter in object_2, who can always read the value of param_1 from object_1?

My english level is quite poor, so I really hope you'll understand what I've wrote.

Thank you.
Sincerely,
Daniel
16 REPLIES 16
Ralph Wessel
Mentor
Cosminn wrote:
Is there a way for an object to read parameters from other object from the floor plan?
Only possible through the ArchiCAD API (in C/C++).
Ralph Wessel BArch
Software Engineer Speckle Systems
Cosminn
Booster
Thank you Ralph,

Do you know someone who can help me?
Sincerely,
Daniel
Ralph Wessel
Mentor
Cosminn wrote:
Do you know someone who can help me?
This is not as straight-forward as GDL. Do you need someone to do the programming for you or do you want instruction? If you want instructions, have you ever used C/C++?
Ralph Wessel BArch
Software Engineer Speckle Systems
Cosminn
Booster
I think I need someone to do the programming for me. For sure
Sincerely,
Daniel
alemanda
Advocate
I think that some simple link can be achieved by GDL using the TXT output.
Obj_1 writes a TXT file with the values of the parameters
Obj_2 read the same TXT file and gets the values of the parameters

But I think it has limited possibilities.
It depends on your needs.
AC27 latest hotfix

Win 10 Pro 64bit

Double XEON 14 CORES (tot 28 physical cores)

32GB RAM - SSD 256GB - Nvidia Quadro K620

Display DELL 25'' 2560x1440

www.almadw.it
Barry Kelly
Moderator
Yes it can be done in GDL with a text file as an intermediate link.
But the object must be visible on screen to write to or read from the text file.

You can bypass this (I think) by using GLOB_USER variables - it is quite a long time since I tried this.
There is a very limited number of these variables and it could be possible that other objects may use them (but pretty unlikely).

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
Cosminn
Booster
Thank you so much for your reply.

If you have time to write a code for that [as a sample], would be very helpful for me. I'll learn from that code and from guide as well.

Again, thank you
Sincerely,
Daniel
Barry Kelly
Moderator
Sure.
Here is s quick couple of objects where 'Object 2' will change based on the size of 'Object 1'.

I have done this using 'GLOB_USER' variables.
You must issue a 'Rebuild and Regenerate" (CTRL+ALT+SHIFT+R) after stretching object 1 in plan.
This doesn't work in 3D - you must R&R in plan.

Instead of using the GLOB_USER value you can write to a text file.
I don't have time at the moment to script this - maybe I can do it later if no-one beats me to it.

I think even with the text file you must do R&R and both objects need to be visible in your plan.

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
Cosminn
Booster
Thanks a lot!

I'll have a look over it.
Sincerely,
Daniel