Rhino 6 Orientation of Text


(Thomas Niederberger) #1

Hi there!

In V6 Text is automatically rotating to be readable. Is there a way to avoid this?
See attached video!


(Lowell Walmsley) #2

@thomasn - You can do it here in the style:


(Thomas Niederberger) #3

@lowell

Ok! Thank you.
I have to check out all those options…


#4

Hey @lowell - is the following the property in RhinoCommon for modifying the “face the user” (orient text toward reader…) setting in a dimension style?

http://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_DocObjects_DimensionStyle_TextOrientation.htm
http://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_DocObjects_TextOrientation.htm

I need to write a script that turns this off in all available styles in a document…

thanks, --Mitch


(Lowell Walmsley) #5

@Helvetosaur - It’s AnnotationBase.DrawForward.
Oops, there’s probably one for styles too.


(Lowell Walmsley) #6

Nope. Nothing on Dimstyle. I don’t see why not though.
I’ll add one.


(Lowell Walmsley) #7

Crap. My mistake - There is DimensionStyle.DrawForward already


#8

Hmm, @lowell having trouble getting this to work…

If I run this:

import scriptcontext as sc
dimstyles=sc.doc.DimStyles
for dimstyle in dimstyles:
    dimstyle.DrawForward=False
    print "Dimstyle: {} DF={}".format(dimstyle.Name, dimstyle.DrawForward)

Nothing happens.The print statement indicates that it has indeed changed the values to False, but they don’t stick. So, I assumed I also needed to run CommitChanges() afterwards…

Unfortunately, if I do that -

import scriptcontext as sc
dimstyles=sc.doc.DimStyles
for dimstyle in dimstyles:
    dimstyle.DrawForward=False
    dimstyle.CommitChanges()

I get:
Message: 'DimensionStyle' object has no attribute 'CommitChanges'

I must be doing something stupid here…?

Thanks, --Mitch


(Lowell Walmsley) #9

I think we’re doing something stupid.
If you add

    sc.doc.DimStyles.Modify(dimstyle, dimstyle.Id, False)

to your script where you tried CommitChanges() I think it will work.
I’m checking now about adding a DimStyle.CommitChanges() function
https://mcneel.myjetbrains.com/youtrack/issue/RH-45521


#10

OK, thanks Lowell, works great! I think I should have found that one myself, though…

Cheers, --Mitch


(Thomas Niederberger) #11

I’m continuing in this thread (sorry for not reading all of your posts), because somehow orientations of text is still buggy - see video


#12

Can you post the file (or part of it) with the problem? --Mitch


(Thomas Niederberger) #13

Of course!

Orientation of text.3dm (166.0 KB)


#14

Fascinating… the text actually moves far away from its control/insertion points when it flips…

It also takes a long time if I Copy/Paste the text object, I get the spinning wheel for a few seconds…


(Lowell Walmsley) #15

In that file, if you change the DimStyle to have ModelSpaceScale 1 and TextHeight 0.175, the text flips correctly.
That means there’s a bug in the flipping code that doesn’t treat that scale adjustment correctly.
I don’t know exactly what’s wrong yet, but it looks like something fixable now.

https://mcneel.myjetbrains.com/youtrack/issue/RH-45853


(Thomas Niederberger) #16

ok! thank you, works!