Make Annotation Style all CAPS?

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.

1 Like

Thx. In the meantime, is it possible in a script to make Layout Text,etc, caps?

1 Like

Hi @Alan_Farkas,

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.GetMultiple(1, 0)
    if go.CommandResult() != Rhino.Commands.Result.Success:
    for objref in go.Objects():
        rhobj = objref.Object()
        if isinstance(rhobj, Rhino.DocObjects.TextObject):
            s = rhobj.TextGeometry.PlainTextWithFields
            t = Rhino.Geometry.AnnotationBase.PlainTextToRtf(s.ToUpper())
            rhobj.TextGeometry.RichText = t

if( __name__ == "__main__" ):

– Dale

1 Like

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;">

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?

I have not tried to use the code above and I personally don’t need uppercase text / annotations.

All I was wondering is if there might be some sort of formatting within a text field instead of clicking the Uppercase button in the text fiel menu.