rs.AddText() ignores font_style=1

It doesn’t font_style=3.

Try this:

Annotations have changed a lot in Rhino 6 and there are a few ways to create them. Unfortunately there’s seems to be something wrong with the method you’re using and were looking into it. (RH-53086)

In the meantime this also works:

from scriptcontext import doc
from Rhino.Geometry import TextEntity, Plane
from Rhino.DocObjects import Font

text = TextEntity.Create('xYz', Plane.WorldXY, doc.DimStyles.Current, False, 0, 0)
text.Font = Font.FromQuartetProperties("Courier New", True, False)
text.TextHeight = 0.1
doc.Objects.AddText(text)

Bumper.

What does that mean in this context?
-wim

It’s a bump and a bummer combined, 'cause it’s still not fixed. :slight_smile:

I’m afraid you will have to spell that out…
-wim

lol, I bumped the thread with that message. It’s meaningless. It’s there just to bring the post up once again in hope it gets needed attention.

But I really don’t get it - this issue is fixed. Did you read the YT at all and am I missing something? Did we fix the wrong thing?
-wim

Oh, snap, it does say it’s fixed, but it’s not in 6.18.

What it’s supposed to looks like:

The fix was introduced in 6.16 so then this must be something else. Does the text in the YT make sense for what you are seeing?
-wim

Yes, it seems like it’s been fixed at least in 6.16, but I can’t remember if it was.

Hi - when we run

import rhinoscriptsyntax as rs
id = rs.AddText("xYz", [0,0,0], height=0.1, font="Arial", font_style=1, justification=65537)

it appears to be working fine in both 6.18 and the in-house 6.19.
What happens when you run that exact code?
-wim

You’re absolutely correct. rs.TextObjectText is what screws this up.

Thanks! I’ve added RH-54742 to the pile.
-wim

Trying to workaround this bug. Why does line 5 fail?..

RH-54742 is fixed in the latest Service Release

1 Like