Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5945

TextObject alignment?

$
0
0

@ivelin.peychev wrote:

How can one change the alignment of the text of a TextObject?

There seems to be no rhinoscriptsyntax methods for this.
Not even to coerce the guid to TextEntity.

I also don’t see an enum or something that lists the DimensionStyles in RhinoCommon when I try to create the Rhino.Geometry.TextEntity.Create

WISH:
Could you please add text alignment to this method?
sc.doc.Objects.AddText(self: ObjectTable, text: str, plane: Plane, height: float, fontName: str, bold: bool, italic: bool, attributes: ObjectAttributes) -> Guid

from enum import Enum
class TextAlignment(Enum):
    Left = 1
    Center = 2
    Right = 3
    Justified = 4

Update:
Hey, I found it:
https://developer.rhino3d.com/wip/api/RhinoCommon/html/T_Rhino_DocObjects_TextDisplayAlignment.htm
But what are these?

[quote]

Normal 0 Normal alignment.
Horizontal 1 Horizontal alignment.
AboveLine 2 Above line alignment.
InLine 3 In line alignment.

[quote]

Posts: 22

Participants: 5

Read full topic


Viewing all articles
Browse latest Browse all 5945

Trending Articles