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.
-wim

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.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()        

– 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;">
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?
-wim

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.

1 Like

Another call for all caps.

Standard architectural documentation in Australia prefers or mandates all caps for clarification.


In this annotation style editing section, the typeface defaults would greatly benefit from including (as well as the existing bold):
All caps,
Small caps,
Italicisation

This then could apply to dimensions, text etc if desired.

And when one is using the style for any added text in the rhino document, it would automatically be all caps/small caps etc regardless of the user’s input.

-Jeremy

hi @jdelavaulx I added your request to the respective Youtrack item. Thanks

2 Likes

Thanks very much Gijs.

For example, a detailing project required all caps for the annotations, and in rhino there wasn’t an easy workflow.
Sometimes it was required to copy text across from another document, but to make it all caps, it had to be done in an external word processor before copying to rhino.

Grasshopper would be useful in this case:

In Rhino 7 this should be possible in with EleFront.

In Rhino 8, annotations can be referenced in Grasshopper and then the text can be overridden with caps using the Text Case component.

annotation_leader_caps.gh (12.7 KB)

1 Like

Thanks for your reply Martin. I will look into EleFront

I think that it’s possibly a good solution also for Rhino to have this natively within the annotation styles, in pursuit of a drafting program which supplies the tools for architectural documentation.

-Jeremy

1 Like