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

Movable hotspot

rengarch
Participant
Could anyone help. Here is the GDL for a movable hotspot for moving text in an object. Whenever I try to move the hotspot, the text jumps to unexpected locations. Why?

2 parameters are inserted in the parameters window
horz - length parameter, which is the horzontal location of the text
verti - length parameter, which is the vertical location of the text

it almost seems like the coordinates needs to be reset????
Thanks

___________________________GDL
unID=1

!_________________________moving it horizontally
hotspot2 horz,verti,unID,horz,1+128 : unID=unID+1
hotspot2 -1,verti,unID,horz,3 : unID=unID+1
hotspot2 horz,verti,unID,horz,2+256 : unID=unID+1

!_________________________moving it vertically
hotspot2 horz,verti,unID,verti,1+128 : unID=unID+1
hotspot2 horz,-1,unID,verti,3 : unID=unID+1
hotspot2 horz,verti,unID,verti,2+256 : unID=unID+1

define style 'identify' ft,fsize,1,0
set style 'identify'

text2 horz,verti,ID
Rita MF Eng, AIA
iMac 27" 3.5 GHz Intel Core i7
NVIDIA GeForce GTX 780M 4096MB
MAC OSX 10.11.6
Archicad 20
2 REPLIES 2
Anonymous
Not applicable
Try this:

unID=1

!_________________________moving it horizontally
hotspot2 0,verti,unID,horz,1+128 : unID=unID+1
hotspot2 -1,verti,unID,horz,3 : unID=unID+1
hotspot2 horz,verti,unID,horz,2+256 : unID=unID+1

!_________________________moving it vertically
hotspot2 horz,0,unID,verti,1+128 : unID=unID+1
hotspot2 horz,-1,unID,verti,3 : unID=unID+1
hotspot2 horz,verti,unID,verti,2+256 : unID=unID+1

define style 'identify' ft,fsize,1,0
set style 'identify'

text2 horz,verti,ID

Peter Devlin
rengarch
Participant
Thank you so much Peter, that did the trick.
I finally understand how to script this movable hotspot.
The manual is sooooooo cryptic.
Rita MF Eng, AIA
iMac 27" 3.5 GHz Intel Core i7
NVIDIA GeForce GTX 780M 4096MB
MAC OSX 10.11.6
Archicad 20