Archicad C++ API
About Archicad add-on development using the C++ API.
SOLVED!

Rotating Text on Custom Object

Chris Pooley
Enthusiast

Hi All,

I Know there is another topic on exactly what I need to do, but I don't understand the solution and I can not reply on that thread for some reason, so I am creating another thread.

 

I have created a custom object as a "space saver" for washing machines and dryers, I have managed to have the text customizable, but I would also like to have the text rotatable.

 

I looked at the treads from back in 2015 and I have the additional commands as per Barry's answer but I keep getting warnings like "Keywords can't be used......" and "Missing Comma......"

 

Here is some of the txt from the 2D script so there is no re-typing:-

 

 

define style{2} "AC_STYLE_1" "Arial", textsize, 0

paragraph "AC_PRG_6" 2, 0, 0, 0, 1
pen penAttribute_3
set style "AC_STYLE_1"
textcontent
endparagraph
textblock "AC_TEXTBLOCK_6" 6.001509469946, 5, 360, 1, 1, 1,
"AC_PRG_6"
ADD2 133.6018704044, -18.33101609568,
ROT2 textrotation,
richtext2 0, 0, "AC_TEXTBLOCK_6",
DEL 2

 

 

Any advice?

 

Thank you 🙂

 

Parameters.PNG

2D Script.PNG

Barry's Answer.PNG

ArchiCAD 25
Windows 10
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Woops, I missed another one.

 

BarryKelly_1-1686011059436.png

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11

View solution in original post

5 REPLIES 5
runxel
Legend

In the line with the "richtext" command there is a comma too much at the end 😉

Lucas Becker | AC 27 on Mac | Author of Runxel's Archicad Wiki | Editor at SelfGDL | Developer of the GDL plugin for Sublime Text |
«Furthermore, I consider that Carth... yearly releases must be destroyed»

Thanks runxel,

 

I changed that, I am now getting this warning:-

ChrisPooley_0-1686004208409.png

 

Cheers,

ArchiCAD 25
Windows 10

Runxel told you about the comma at the end of the RICHTEXT2 command.

You also have one at the end of the ROT2 command.

The comma means it is trying to run the next line as part of the same command, which is not correct.

 

BarryKelly_0-1686010990130.png

 

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Solution

Woops, I missed another one.

 

BarryKelly_1-1686011059436.png

Barry.

One of the forum moderators.
Versions 6.5 to 27
Dell XPS- i7-6700 @ 3.4Ghz, 16GB ram, GeForce GTX 960 (2GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
Chris Pooley
Enthusiast

Thank you both for your help, that was it, it did not like the commas at the end.

 

Thank you so much.

ArchiCAD 25
Windows 10