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

Relations betwwen gsm objects

Cosminn
Newcomer
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.
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro
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

Cosminn
Newcomer
Thank you Ralph,

Do you know someone who can help me?
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

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

Cosminn
Newcomer
I think I need someone to do the programming for me. For sure
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

alemanda
Participant
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.
AC 19 and AC21 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 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

Cosminn
Newcomer
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
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

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 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

Cosminn
Newcomer
Thanks a lot!

I'll have a look over it.
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

Cosminn
Newcomer
Indeed Barry,

Works properly. I really liked. This will save many problems and also time.

What if I have 2 or more Objects_1 and one objects_2. Will be possible to read from all of them? If yes, what is the condition?

Thank you
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

Barry Kelly
Moderator
Unfortunately you can only have one object_1.
You can have as many object_2 as you want but they will all follow the parameters of object_1

This is where the GLOB_USER variables will be very restrictive because there are only 10 numeric variables available (and another 10 string variables which I think can be used for numbers as well).

You will have a similar problem with the text output although you will have much better control of what you can output to and read from the file.

You could add some control to object_1 to say output to variables 1,2 & 3 or variables 4, 5 & 6 (7,8 & 9 etc.) - assuming you are controlling 3 variables - it could be any number.
i.e. add a parameter to say use variables 'group 1' or 'group 2' or 'group 3' etc.
The object_2 you can tell it to read 'group 1' or 'group 2' or 'group 3' etc.

But I really think you could get into a terrible mess - especially if you want other people to use your objects.


If you only have one object_1 then it is pretty straight forward as you can have as many object_2 as you want react to it.
More difficult if you have more object_1 as they need to output to different variables and then you have to tell each object_2 which variables to read.

I hope I have explained this clearly enough (it has been a long day).

If you want more than one object_1 then I probably would not try this with GDL.
Maybe it will work with an API add-on if you can create a link between objects but I don't know as I have no idea about coding add-ons.

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

Cosminn
Newcomer
Your information was very helpful Barry.

Thank you so much.
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

Cosminn
Newcomer
@Barry :
You said :
"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."

If you'll have time to write a sample script for this, or maybe you can let me know which part from the guide should I looking for this, will help a lot.

Anyway, a Script is a Script

Thank you for your time

Regards,

Daniel
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

Barry Kelly
Moderator
Try this.

You can still only have one 'object_1' in you plan otherwise you will have multiple objects trying to write different information to the same text file.

You can have as many 'object_2' as you want and they will all change when you alter object one on screen.
You must do a 'Rebuild and Regenerate' command (CTRL+ALT+SHIFT+R) if you change object_1 in plan.
If you do it in 3D window then it should all be live.

I have set the objects so they will create and read from an '.XLS' file that has the same name as your Archicad file but with the added name of '_object_sizes.xls'
It will be located in the same folder as your Archicad file.

I assume it will work if you are using a MAC - but I am not 100% sure.


Forget what I said before about using GLOB_USER variables.
Graphisoft have discontinued their use from version 19 so they will be completely useless.


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

Cosminn
Newcomer
Thank you so much.
I'll try it.
Seems to be exactly what I need. Those Global Variables was worked properly. But I need to try this as well. What I need is:
5-10 Objects to read from One object, this can be an assembly.
And I need few assemblies like this in on project. @40 assemblies.
Do you think will work? I mean will make the project process harder?

Again Thank you!!!
------------------------------------------------------------
AC24
•Workstation HP Z800 2 x Intel Xeon Quad Core E5620/E5630, 36 GB ram DDR3 - NVIDIA QUADRO 4000 2 GB memory, Windows 10 pro

Barry Kelly
Moderator
I would forget the GLOB_USER variables.
That will only work up to version 18.
From 19 onwards they will no longer work.

I am not sure exactly what you are trying to do but it should work.
If you have got 40 assemblies then you will need 40 master objects ('object_1' but of course with unique names).
Each one of those objects will need to write to a unique text file - that is where you can customise the file name in the file path.

Otherwise you could write to just the one text file but you would need unique names for the fields being written and read.
i.e. master_1 would have to save 'length_1', 'width_1' and 'height_1'.
master_2 would have to save 'length_2', 'width_2' and 'height_2'
master_3 would have to save 'length_3', 'width_3' and 'height_3'
etc.

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

Didn't find the answer? Start a new discussion

Labels

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!