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

Text Rotation

Red
Advocate
Can text be scripted so that it automatically stays vertical as you rotate the object
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
8 REPLIES 8
TomWaltz
Participant
You need a statement like:
ROT2 -SYMB_ROTANGLE
to rotate the text by the negative of the angle the object is rotated.
Tom Waltz
Red
Advocate
Can the text stay in it original position with the object and remain vertical?
As you can see in the image I attached......once I rotate it the text is staying. I understand the reason behind it doing that with -SYMB_ROTANGLE.
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
TomWaltz
Participant
Check these:
1) Make sure the text is center anchored (position #5)
2) make sure the text origin is rotating with the symbol (i.e., after the ROT2 statement that rotates the rest of the symbol)
3) Make sure there is no DEL statement which removes the ROT2 statement that rotates the rest of the symbol
Tom Waltz
Red
Advocate
Here is my simple little code.
RECT2 -1',-1',1',1'
LINE2 1',-1',3',0
LINE2 1',1',3',0

HOTSPOT2 0,0
HOTSPOT2 3',0

DEFINE STYLE    "STYLE" architxt, 
		6,      5,      0
SET STYLE "STYLE"

ROT2 -SYMB_ROTANGLE

TEXT2 0,-1", txt
TEXT2 1'-7",-1", txt2
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
TomWaltz wrote:
ROT2 -SYMB_ROTANGLE
Mirroring can come into it also. This covers both cases:

IF SYMB_MIRRORED=1 THEN ROT2 SYMB_ROTANGLE   !! mirrored
IF SYMB_MIRRORED=0 THEN ROT2 -SYMB_ROTANGLE  !! not
I still prefer V~ & W~.

Red: Use ADD2 before the TEXT2s instead of putting values in the TEXT statements. Put the ROT2s directly before the TEXT2s.

ADD2 X1, Y1
IF SYMB_MIRRORED=1 THEN ROT2 SYMB_ROTANGLE   !! mirrored
IF SYMB_MIRRORED=0 THEN ROT2 -SYMB_ROTANGLE  !! not
TEXT2 0, 0, txt
DEL 2

ADD2 X2, Y2
IF SYMB_MIRRORED=1 THEN ROT2 SYMB_ROTANGLE   !! mirrored
IF SYMB_MIRRORED=0 THEN ROT2 -SYMB_ROTANGLE  !! not
TEXT2 0, 0, txt2
DEL 2
So it's: Go there, turn, write, go back; repeat.

About the 5th thing I ever tried in GDL was a section marker, and I still have the bruises on my brain from getting text to flip right. Good luck.
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info
Red
Advocate
Thanks!

That works great.
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
Red
Advocate
Results...............
Thanks,
Red
i7 8700k
ROG Strix Z390-E MoBo
64gb RAM
EVGA GeForce GTX 2080
_______________________
http://www.facebook.com/flatcreekdesignstn
http://www.sraarchitects.biz
Red wrote:
Results...............
Great!
James Murray

Archicad 27 • Rill Architects • macOS • OnLand.info