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

Adding Text rotation to a Custom Object?

rob2218
Enthusiast
how best to do this?
Im sure it's just a line or two I have to add....but not sure where and in what position along the parameters.

thanks,
(see attached).
I just want the ability to be able to rotate the "text" inside the box to any angle I need it.

thanks for you help in advance.

TEXT-PARAMETER-ROTATION-SMALL.jpg
...Bobby Hollywood live from...
i>u
Edgewater, FL!
SOFTWARE VERSION:
Archicad 22, Archicad 23
Windows7 -OS, MAC Maverick OS
17 REPLIES 17
Anonymous
Not applicable
I thought to add the screenshot to show you guys because the text has not been succeed. It disappears.

Thought to share with you for the scripts.

Thank you for your time.

Hope someone will help me to fix this. That is text rotation I need it really badly. I have a lot of text with 2d lines objects that need to be rotating.
Anonymous
Not applicable
Moderators,

Its almost two weeks that I have not heard from any of you.

I tried with GDL Cookbook called "Intro to Object Making" published 2000. I find no solution of 2D objects especially I attempted to learning how to create 3D objects which it was cool to learn. I was somewhat disappointing that 2D objects has not been really achieve. I am trying to find a solution for 2D text rotating with Lines objects.

Hope you guys will review with my old posts and see what I do wrong. Visual description would be great! It would point out where i did wrong or whatever.

Thanks.
Barry Kelly
Moderator
The screen shot is great but could you please copy and paste the text form the 2D script.
I am too lazy to type it out myself.
If I get a spare moment I will have a look at it.

I think in your image the RICHTEXT2 command needs to be after the PARAGRAPH and TEXTBLOCK commands, and not at the beginning of the script.


But basically to rotate the text you need to add a ROT command just before placing the text (i.e. just before the RICHTEXT2 command).
So you control the position of where you want to place the text Then ROT and then place the text.
Then DEL to stop the ROT and further DELs if you want to undo the movements to place the text (i.e. reset your origin).

Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
David Maudlin
Rockstar
Barry wrote:
The screen shot is great but could you please copy and paste the text form the 2D script.
I am too lazy to type it out myself.
Best would be to zip and attach the object. It takes time to recreate not only the code but the parameters driving the code.

David
David Maudlin / Architect
www.davidmaudlin.com
Digital Architecture
AC27 USA • iMac 27" 4.0GHz Quad-core i7 OSX11 | 24 gb ram • MacBook Pro M3 Pro | 36 gb ram OSX14
Laszlo Nagy
Community Admin
Community Admin
cadpg wrote:
Moderators,

Its almost two weeks that I have not heard from any of you.

I tried with GDL Cookbook called "Intro to Object Making" published 2000. I find no solution of 2D objects especially I attempted to learning how to create 3D objects which it was cool to learn. I was somewhat disappointing that 2D objects has not been really achieve. I am trying to find a solution for 2D text rotating with Lines objects.

Hope you guys will review with my old posts and see what I do wrong. Visual description would be great! It would point out where i did wrong or whatever.

Thanks.


I think you are misunderstanding something here.
This is a user forum where users are helping each other if they can. However, it cannot be either forced or expected that someone will help you. That is just the nature of user forums.
Loving Archicad since 1995 - Find Archicad Tips at x.com/laszlonagy
AMD Ryzen9 5900X CPU, 64 GB RAM 3600 MHz, Nvidia GTX 1060 6GB, 500 GB NVMe SSD
2x28" (2560x1440), Windows 10 PRO ENG, Ac20-Ac28
Anonymous
Not applicable
Hello Moderators (Barry, LaszloNagy,David) ,

Thank you, I understand. Like I said I am not familiar with this forum. It's still fairly new to me. My apologize for misunderstanding.
Whoever want to grab this first. Be my guest. Thank you for a quick response. I appreciated it.

Let's see if I can make a zip attachment and give to one of you guys or 2D Script below. Either way that works for your efficient.

Copy and paste 2d Script if you want.....

!
! Name : North Direction.gsm
! Date : Tuesday, January 29, 2019
! Version : 17.00
! Written by ArchiCAD
!

mul2 A/12.693534, B/45.114999
add2 1270'-9.2648", 141'-6.3966"
pen penAttribute_1
fill fillAttribute_1
poly2_b{5} 5, 3, 0, 3, penAttribute_1, penAttribute_2,
0'-0.0000", 0'-0.0000", 3'-3.3701", 0'-0.0000", 0'-0.0000", 3'-3.3701", 0'-0.0000",
-1249'-11.3921", -64'-9.9344", 1,
-1249'-11.3921", -53'-3.1682", 1,
-1249'-11.3921", 6'-5.7845", 1,
-1259'-9.2211", -64'-9.9344", 1,
-1249'-11.3921", -64'-9.9344", 1
pen penAttribute_3
hotspot2 -1249'-11.3921", -141'-6.3966"
hotspot2 -1249'-11.3921", 6'-5.7845"
hotspot2 -1240'-1.5632", -64'-9.9344"
hotspot2 -1259'-9.2211", -64'-9.9344"
pen penAttribute_1
set line_type lineTypeAttribute_1
line_property 0
line2 -1249'-11.3921", 6'-5.7845", -1249'-11.3921", -141'-6.3966"
line2 -1249'-11.3921", 6'-5.7845", -1259'-9.2211", -64'-9.9344"
line2 -1259'-9.2211", -64'-9.9344", -1240'-1.5632", -64'-9.9344"
line2 -1249'-11.3921", 6'-5.7845", -1240'-1.5632", -64'-9.9344"
define style{2} "AC_STYLE_1" "Arial", 1735'-2.7262", 0

paragraph "AC_PRG_2" 2, 0'-0.0000", 0'-0.0000", 0'-0.0000", 3'-3.3701"
pen penAttribute_4
set style "AC_STYLE_1"
"N"
endparagraph
textblock "AC_TEXTBLOCK_2" 3470'-5.4523", 5, 1181'-1.2283", 3'-3.3701", 3'-3.3701", 3'-3.3701",
"AC_PRG_2"
richtext2 -1249'-11.3921", -91'-10.0197", "AC_TEXTBLOCK_2"
Solution
Barry Kelly
Moderator
I had a look at your object and there are a couple of things you need to do.

Change the text rotation parameter to and 'angle' type variable rather than a real number.


Now use that variable in the TEXTBLOCK command.
You don't need a separate ROT command as I had said before.
I keep forgetting the TEXTBLOCK has a rotation option built into it.


Barry.
One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Anonymous
Not applicable
Barry,

I love you!!! Thank you so much!

Oh,the parameter of Angle, not "Real Number". The icon fools me. I wonder why it looks like rotating icon to me. (facepalm myself)

It works now. Now, I will have to redo all of my 2D scripts Templates with text rotation for years. I was struggling for so long time.

With visual attachment does help me a lot to understand thing better with scripts. Now, i can see why I did wrong last time for other things as well. I hope I can achieve with other objects as well.

Thank you so much for a big help. This is only thing that i need.