AddTextObject?

You will need to program rs.Command() with _TextObject in this case. Following is a quickie example…

import rhinoscriptsyntax as rs

def AddTextObjectAsCurves():
    tol=rs.UnitAbsoluteTolerance()
    text=rs.GetString("Enter your text")
    if text==None: return
    
    ht=rs.GetReal("Text height?",minimum=tol)
    if ht==None: return
    
    commStr="-_TextObject _GroupOutput=_Yes _FontName=Arial "
    commStr+="_Italic=_No _Bold=_No "+str(ht)+" _Output=_Curves "
    commStr+="_AllowOpenCurves=_No _LowerCaseAsSmallCaps=_No "
    commStr+="_AddSpacing=_No "+text
    
    rs.Command(commStr,True)
    
AddTextObjectAsCurves()

--Mitch
1 Like