Is it possible to either tell Rhino that an annotation style is all CAPS, or to Dup a font in (say, Arial) and make it all CAPS so you can apply the newly created ArialCAPS to an annotation style?
Hi Alan -
We have that feature request on the list as RH-64580. I have added this thread.
Thx. In the meantime, is it possible in a script to make Layout Text,etc, caps?
This might be a good starting point for a script.
import Rhino import scriptcontext as sc def __textobject_filter(rhObject, geometry, componentIndex): return isinstance(rhObject, Rhino.DocObjects.TextObject) def test_upper_case_text(): go = Rhino.Input.Custom.GetObject() go.SetCommandPrompt("Select text") go.SetCustomGeometryFilter(__textobject_filter) go.GetMultiple(1, 0) if go.CommandResult() != Rhino.Commands.Result.Success: return for objref in go.Objects(): rhobj = objref.Object() if isinstance(rhobj, Rhino.DocObjects.TextObject): rhobj.TextGeometry.ClearPropertyOverrides() s = rhobj.TextGeometry.PlainTextWithFields t = Rhino.Geometry.AnnotationBase.PlainTextToRtf(s.ToUpper()) rhobj.TextGeometry.RichText = t rhobj.CommitChanges() sc.doc.Views.Redraw(); if( __name__ == "__main__" ): test_upper_case_text()
thanks, @dale I’ll see if I can do something with it!
So it is impossible to use some sort of formatting in a text field to create uppercase text?
Something like this html code?
<p style = "text-transform:uppercase;"> Test </p>
I guess I don’t understand the question. What is the workflow that you are trying to achieve? Why is the code that Dale provided not working for you?