cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:
BIM Coordinator Program (INT) April 22, 2024

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

GDL
About building parametric objects with GDL.
SOLVED!

# Problem with graphical hotspots

Contributor

Hi, everyone!

I'm trying to educate myself with GDL.

For the moment I'm trying to figure out how to use graphical hotspot. Generally I understand the idea but I have some issues.

I've made two circles, where the first one is static and the second one is movable.

Issue is that I want the moving point to be exactly at the right side (or right pole) of the second circle. However when I try to move it the cursor goes from right side to the center of the circle.

Tried to improve my code with chatGPT but it failed miserably.

The problem as I understand it is with coordinates of the moving point and the second circle itself.

Here is a code I made. There are few variables that defined:

``````radCircle - circle radius
movX - parameter for hotspots to works with

! First circle
hsID = hsID+1
HOTSPOT2 0, 0, hsID ! Center point of the first circle
hsID = hsID+1
HOTSPOT2 radCircle, 0, hsID ! Hotspot for the right side of the first circle

! Second circle
hsID = hsID+1
HOTSPOT2 0, 0, hsID, movX, 1 ! Base point
hsID = hsID+1
HOTSPOT2 movRad, 0, hsID, movX, 2 ! Moving point
hsID = hsID+1
HOTSPOT2 -radCircle, 0, hsID, movX, 3 ! Reference point``````
1 ACCEPTED SOLUTION

Accepted Solutions
Solution
Guru

You have Circle 1 or radius radCircle, and Circle 2 of radius radCircle which can move along a linear path that runs through Circle 1?

``````hsID = 0

HOTSPOT2	radCircle,			0,	hsID,	movX,	1		:	hsID = hsID+1	!Base
HOTSPOT2	movX + radCircle,	0,	hsID,	movX,	2		:	hsID = hsID+1	!Moving
HOTSPOT2	-radCircle,			0,	hsID,	movX,	3		:	hsID = hsID+1	!Ref``````

Ling.

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

You have Circle 1 or radius radCircle, and Circle 2 of radius radCircle which can move along a linear path that runs through Circle 1?

``````hsID = 0

HOTSPOT2	radCircle,			0,	hsID,	movX,	1		:	hsID = hsID+1	!Base
HOTSPOT2	movX + radCircle,	0,	hsID,	movX,	2		:	hsID = hsID+1	!Moving
HOTSPOT2	-radCircle,			0,	hsID,	movX,	3		:	hsID = hsID+1	!Ref``````

Ling.

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

Wow! Thank you so much. I didn't expect it to be so easily done.

Just to be clear, the problem was that base point was at the center of coordinates. But why moving the base point made everything as intended?

You had movRad so while you edited movX the node you were actually moving never changed.

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