We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Hotspot Problem, Almost Solved

Anonymous
Not applicable
I'm creating a symbol that can have a piece of text positioned anywhere the user wants. You can rotate the symbol any way you want, but the text will always remain horizontal. In the code below, everything works great except when you rotate the symbol off of 0 degrees. The diamond hotspot rotates as it should, but the text won't move. It's still linked to the position of the diamond, but it won't follow the diamond when it is rotated.
IF TheAngle < 0 THEN TheAngle = TheAngle + 360 
HOTSPOT2 Switch_X,        0, unID, Switch_Y, 1+128 : unID = unID + 1 
HOTSPOT2 Switch_X,        0, unID, Switch_Y,     3 : unID = unID + 1 
HOTSPOT2 Switch_X, Switch_Y, unID, Switch_Y,     2 : unID = unID + 1 
 
HOTSPOT2        0, Switch_Y, unID, Switch_X, 1+128 : unID = unID + 1 
HOTSPOT2        0, Switch_Y, unID, Switch_X,     3 : unID = unID + 1 
HOTSPOT2 Switch_X, Switch_Y, unID, Switch_X,     2 : unID = unID + 1 
 
SET STYLE "AC_STYLE_1" 
ROT2 -SYMB_ROTANGLE 
TEXT2 Switch_X, Switch_Y, "S" 
DEL 1


Any ideas? I've been laboring at this for about three hours, and I'm spent.
2 REPLIES 2
Anonymous
Not applicable

SET STYLE "AC_STYLE_1"
ADD2 Switch_X, Switch_Y
ROT2 -SYMB_ROTANGLE
TEXT2 0, 0, "S"
DEL 2
Anonymous
Not applicable
Thank you! That worked perfect! I had an ADD2 at one point, but I still had TEXT Switch_X, Switch_Y, "S", so it was not working.