Hi there!
In V6 Text is automatically rotating to be readable. Is there a way to avoid this?
See attached video!
Hi there!
In V6 Text is automatically rotating to be readable. Is there a way to avoid this?
See attached video!
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
Nope. Nothing on Dimstyle. I don’t see why not though.
I’ll add one.
Crap. My mistake - There is DimensionStyle.DrawForward already
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
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
OK, thanks Lowell, works great! I think I should have found that one myself, though…
Cheers, --Mitch
I’m continuing in this thread (sorry for not reading all of your posts), because somehow orientations of text is still buggy - see video
Can you post the file (or part of it) with the problem? --Mitch
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…
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.
ok! thank you, works!