License Delivery maintenance is expected to occur on Saturday, November 30, between 8 AM and 11 AM CET. This may cause a short 3-hours outage in which license-related tasks: license key upload, download, update, SSA validation, access to the license pool and Graphisoft ID authentication may not function properly. We apologize for any inconvenience.
Libraries & objects
About Archicad and BIMcloud libraries, their management and migration, objects and other library parts, etc.

Independent HotSpot2 Rotation

Anonymous
Not applicable
I have a symbol representing an electrical outlet along with informational text. The text has its own hotspots, so it is free to move independently of the symbol, but they are still restricted to the rotation of the symbol. Ideally i would like to have one gdl object with one symbol and multiple text elements, each able to rotate and move independently of each other. Can each hotspot group be rotated independently, like they can be moved independently?
6 REPLIES 6
TomWaltz
Participant
A wrote:
I have a symbol representing an electrical outlet along with informational text. The text has its own hotspots, so it is free to move independently of the symbol, but they are still restricted to the rotation of the symbol. Ideally i would like to have one gdl object with one symbol and multiple text elements, each able to rotate and move independently of each other. Can each hotspot group be rotated independently, like they can be moved independently?
Through GDL, you can rotate any elements separately of any others. It's just a matter of grouping your ROT2 and DEL statements so that each hotspot/element is rotated independently.
Tom Waltz
Anonymous
Not applicable
Using a script like this...

hotspot2 0, yy, UnID, xx, 1 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, xx, 2 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 3 :UnID = UnID + 1

hotspot2 xx, 0, UnID, yy, 1 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, yy, 2 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 3 :UnID = UnID + 1

Text2 xx, yy, "text"

...i was able to get my text to move seperately from my symbol. Is there a way for me to use...

hotspot2 0, yy, UnID, xx, 1 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, xx, 2 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 3 :UnID = UnID + 1
hotspot2 0, yy, UnID, xx, 4 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, xx, 5 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 6 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 7 :UnID = UnID + 1

hotspot2 xx, 0, UnID, yy, 1 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, yy, 2 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 3 :UnID = UnID + 1
hotspot2 xx, 0, UnID, yy, 4 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, yy, 5 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 6 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 6 :UnID = UnID + 1

Text2 xx, yy, "text"

...or something like that to also activate the angle type parameter for the individual hotspot groups?
TomWaltz
Participant
That works well for basic movement. If you want rotation, you will need to add a ROT2 line. The problem with that is that if you are placing Text at X, Y, then the rotation applies as well, placing it at the rotated X, Y.

I find that I usually have to do something like:
ADD2 X, Y
ROT2 ang
TEXT2 x, y, "Text"
DEL 2
Tom Waltz
Anonymous
Not applicable
Thanks for your help and baring with me Tom. I understand your suggestion, but that does not allow me to alter the movement or rotation of the text in the model window. By using that hotspots I'm able to move a hotspot and a corresponding text. I think if i can use the below correctly, I can also rotate a hotspot independently in the model window. Is it possible?

hotspot2 0, yy, UnID, xx, 1 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, xx, 2 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 3 :UnID = UnID + 1
hotspot2 0, yy, UnID, xx, 4 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, xx, 5 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 6 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 7 :UnID = UnID + 1

hotspot2 xx, 0, UnID, yy, 1 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, yy, 2 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 3 :UnID = UnID + 1
hotspot2 xx, 0, UnID, yy, 4 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, yy, 5 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 6 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 6 :UnID = UnID + 1

Text2 xx, yy, "text"


My full script is the following, and using the rotate tool in the mouse tracker rotates the symbol and text together, just like the drag tool moves the two together. But using the stretch tool allows me to move the hotspot and corresponding text separately, can i get a similar function to rotate to work separately from the symbol as well?

Pen gs_cont_pentx
Define Style "AC_STYLE1" cu_font_style, (6.75/72 * 25.4), 5, cu_font_bold
Set Style "Ac_style1"

hotspot2 0, yy, UnID, xx, 1 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, xx, 2 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 3 :UnID = UnID + 1
hotspot2 0, yy, UnID, xx, 4 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, xx, 5 :UnID = UnID + 1
hotspot2 0, 0, UnID, xx, 6 :UnID = UnID + 1
hotspot2 -.1, 0, UnID, xx, 7 :UnID = UnID + 1

hotspot2 xx, 0, UnID, yy, 1 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, yy, 2 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 3 :UnID = UnID + 1
hotspot2 xx, 0, UnID, yy, 4 + 128 :UnID = UnID + 1
hotspot2 xx, yy, UnID, yy, 5 :UnID = UnID + 1
hotspot2 0, 0, UnID, yy, 6 :UnID = UnID + 1
hotspot2 0, -.1, UnID, yy, 6 :UnID = UnID + 1

Text2 xx, yy, "text"
cu_del = cu_del + 1



Hotspot2 0, 0
Hotspot2 A, 0
Hotspot2 A/2, 0
Hotspot2 0, B
Hotspot2 A, B
Hotspot2 A/2, B
Hotspot2 A, B/2
Hotspot2 0, B/2

RECT2 0,0, A, B
RECT2 1.5",1.5",A-1.5",B-1.5"

TEXT2 A/2, B/2, "O"

I appreciate the time and effort.
TomWaltz
Participant
A wrote:
Thanks for your help and baring with me Tom. I understand your suggestion, but that does not allow me to alter the movement or rotation of the text in the model window. By using that hotspots I'm able to move a hotspot and a corresponding text. I think if i can use the below correctly, I can also rotate a hotspot independently in the model window. Is it possible?.
You'll need rotation hotspots to make it happen. Rotation hotspots use the format:

HOTSPOT2	0,0,						unID, angle, 6 : unID = unID + 1
HOTSPOT2 	A, 0, 					unID, angle, 4 : unID = unID + 1
HOTSPOT2 	A*COS(angle), A*SIN(angle), unID, angle, 5 : unID = unID + 1
ROT2 angle
Tom Waltz
Anonymous
Not applicable
Thanks again for all your help!