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.

Rotating Window/Door Marker Text

Anonymous
Not applicable
I have created a window marker from gdl script. I am able to have the window marker rotate with the actual window, but I can't get the text in the window marker to rotate along with the marker and window. The following is the script I have so far:

unID = 1

HOTSPOT2 locX, 0, unID, locY, 1+128 : unID = unID +1
HOTSPOT2 locX, -1, unID, locY, 3: unID = unID +1
HOTSPOT2 locX, locY, unID, locY, 2: unID = unID +1

HOTSPOT2 0, locY, unID, locX, 1+128: unID = unID +1
HOTSPOT2 -1, locY, unID, locX, 3: unID = unID +1
HOTSPOT2 locX, locY, unID, locX, 2: unID = unID +1

ADD2 locX, locY

MUL2 GLOB_SCALE, GLOB_SCALE
PEN 11
HOTSPOT2 0', 0'-0.0774"
HOTSPOT2 0', 0'
HOTSPOT2 0', -0'-0.0716"
HOTSPOT2 -0'-0.1492", 0'-0.0774"
HOTSPOT2 -0'-0.2014", 0'-0.0029"
HOTSPOT2 -0'-0.1492", -0'-0.0716"
HOTSPOT2 0'-0.1492", 0'-0.0774"
HOTSPOT2 0'-0.2014", 0'-0.0029"
HOTSPOT2 0'-0.1492", -0'-0.0716"
PEN 12
LINE2 0', 0'-0.0774", 0', -0'-0.0716"
LINE2 -0'-0.1492", 0'-0.0774", -0'-0.2014", 0'-0.0029"
LINE2 -0'-0.1492", -0'-0.0716", -0'-0.2014", 0'-0.0029"
LINE2 0'-0.1492", -0'-0.0716", 0'-0.2014", 0'-0.0029"
LINE2 0'-0.1492", 0'-0.0774", 0'-0.2014", 0'-0.0029"
LINE2 -0'-0.1492", 0'-0.0774", 0'-0.1492", 0'-0.0774"
LINE2 -0'-0.1492", -0'-0.0716", 0'-0.1492", -0'-0.0716"
PEN 11
DEFINE STYLE "AC_STYLE_1" "Arial Narrow Western",
8'-1.2222", 5, 0
STYLE "AC_STYLE_1"


If anyone has any ideas on how to fix this I would greatly appreciate it. Thanks,
farrelca
4 REPLIES 4
Anonymous
Not applicable
I don't see any Text2 statement in your script so it's hard to say.

For rotating the text: If you want to keep the text horizontal to the page then you can use:
rot2 -SYMB_ROTANGLE
Text2 0, 0, AC_WIDO_ID
del 1
If you want the text to rotate with the wall this is a little more complicated since you have to correct for when it turns upside down or faces the wrong way.
Anonymous
Not applicable
If you want the text to rotate with the wall this is a little more complicated since you have to correct for when it turns upside down or faces the wrong way.
That's what I am attempting to get to. I have a very limited knowledge on gdl... is this something I would be able to do myself?

Also, the text that appears in the window marker is derived from the I.D. number that I enter in "Listing and Labeling" for each window. Should I change this so it references a Text2 number?

Thanks for your help.
Anonymous
Not applicable
farrelca wrote:
I have a very limited knowledge on gdl... is this something I would be able to do myself?
It depends on how easily you can pick it up. The basic code to do this is:
mul2 GLOB_SCALE, GLOB_SCALE

DEFINE STYLE "text_style" "Arial", 2.5, 5, 0
STYLE text_style

Circle2 0, 0, 5/32"

IF SYMB_ROTANGLE > 90 & SYMB_ROTANGLE <= 270 THEN
	rot2 180
ENDIF

Text2 0, 0, AC_WIDO_ID
The AC_WIDO_ID is the parameter used by the door/window marker subtype to express the ID of the associated door or window.

Also, the text that appears in the window marker is derived from the I.D. number that I enter in "Listing and Labeling" for each window. Should I change this so it references a Text2 number?

Thanks for your help.
I don't understand how you can get text to display on plan without the Text2 statement.
Anonymous
Not applicable
What you suggested worked out. Thanks so much for your help.