BIM Coordinator Program (INT) April 22, 2024

Find the next step in your career as a Graphisoft Certified BIM Coordinator!

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

GDL: Editable 3D Hotspot within Array

Lingwisyer
Guru
Hi all,

Is it possible to have editable 3D hotspots within an array? I seem to be only getting static hotspots... I got it working with 2D hotspots...

		hotspot ProWidth / 2,	0,	ProLength
		hotspot -ProWidth / 2,	0,	ProLength
		hotspot ProWidth / 2,	0,	-ProLength2 + HSO
		hotspot -ProWidth / 2,	0,	-ProLength2 + HSO

		hotspot ProWidth / 2,	ProHeight,	0,						unID, ProLength, 1+128	:unID = unID + 1
		hotspot ProWidth / 2,	ProHeight,	ProLength + sqr((SquareV2)^2-(ProHeight)^2),	unID, ProLength, 2	:unID = unID + 1
		hotspot ProWidth / 2,	ProHeight,	-ProLength2 + sqr((SquareV2)^2-(ProHeight)^2),	unID, ProLength, 3	:unID = unID + 1

		hotspot -ProWidth / 2,	ProHeight,	0, 						unID, ProLength, 1+128	:unID = unID + 1
		hotspot -ProWidth / 2,	ProHeight,	ProLength + sqr((SquareV2)^2-(ProHeight)^2),	unID, ProLength, 2	:unID = unID + 1
		hotspot -ProWidth / 2,	ProHeight,	-ProLength2 + sqr((SquareV2)^2-(ProHeight)^2),	unID, ProLength, 3	:unID = unID + 1

		hotspot ProWidth / 2,	ProHeight, -ProLength2 + sqr((SquareV2)^2-(ProHeight)^2)
		hotspot -ProWidth / 2,	ProHeight, -ProLength2 + sqr((SquareV2)^2-(ProHeight)^2)



Ling

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Lingwisyer
Guru
sinceV6 wrote:
Inside a FOR loop?

That is correct. I managed to get it to work by adding the variable I am wanting to change (ProLength) to the parameter list and by adding a glob_modpar statement to change the order some of the calculations were done in. It seems that a user cannot edit a parameter via hotspots that is not shown in the parameter list.

Using an array might help with my hotspots when I cut diagonally through my object. Then I would not have hotspots floating out in the middle of nowhere, but I will look into that separately.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660

View solution in original post

7 REPLIES 7
Nader Belal
Mentor
Yes it's possible, but you have to specify which index of which array that you need to make the graphical editable 3D Hotspot.

i.e.: taken from a work I have done recently (in pseudo code)

array points_array[]

for __i = 1 to vardim1 (points[])
hotspot origin_refrence, hotspot_id, points_array[__i], 128 : hotspot_id = hotspot_id + 1
hotspot points_array[__i], hotspot_id, points_array[__i], 2 : hotspot_id = hotspot_id + 1
hotspot -ve_direction_ref, hotspot_id, points_array[__i], 3 : hotspot_id = hotspot_id + 1
next __i
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.
Lingwisyer
Guru
My bad. I mean an object array, not a parameter array. For i = 1 to x
I have yet to explore parameter arrays



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Nader Belal
Mentor
@lingswing

can you be more specific, or explain what is your case ??
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.
Lingwisyer
Guru
I have a stretchable sub-object that gets multiplied at various distances depending on other variables. These hotspots would enable the sub-object to be modified in the 3D view.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Nader Belal
Mentor
I don't get the idea, maybe by a simple diagram I would get what you want?
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.
sinceV6
Advocate
Inside a FOR loop? it is possible, but if I'm getting right what you are trying to do, every resulting stretchable sub object will be the same (tied to the same value of the parameter). If you want each sub object to work independently, you'll need a parameter array: a parameter that can have several values.

Dig a bit into it... they open an array of possibilities (pun intended)

Best regards.
Solution
Lingwisyer
Guru
sinceV6 wrote:
Inside a FOR loop?

That is correct. I managed to get it to work by adding the variable I am wanting to change (ProLength) to the parameter list and by adding a glob_modpar statement to change the order some of the calculations were done in. It seems that a user cannot edit a parameter via hotspots that is not shown in the parameter list.

Using an array might help with my hotspots when I cut diagonally through my object. Then I would not have hotspots floating out in the middle of nowhere, but I will look into that separately.



Ling.

AC22-23 AUS 7000Help Those Help You - Add a Signature
Self-taught, bend it till it breaksCreating a Thread
Win11 | i9 10850K | 64GB | RX6600 Win10 | R5 2600 | 16GB | GTX1660
Learn and get certified!