Set text Horizontal to View with script

(James Head Mears) #1

I’m trying to use the new text features in Rhino 6 but cannot seem to get them to work. I’m inserting text with Rhino.AddText function but this does not have an option to enable Horizontal to view. Does anyone know how to enable this through VB scripting?

(Alain Cormier) #6

I don’t think that can be done with RhinoScript but it can be done this way when scripting with Python:

import rhinoscriptsyntax as rs
from scriptcontext import doc
import Rhino

id = rs.AddText('coffee', Rhino.Geometry.Plane.WorldXY)
o = doc.Objects.FindId(rs.coerceguid(id))
o.Geometry.TextOrientation = Rhino.DocObjects.TextOrientation.InView

(James Head Mears) #7

Thanks Alain. I guess I’ll be converting my VB to Python


Hi @Dale, could this also be exposed in RhinoScript as additional text object property in future ?
( by the way, I had no idea you can do that - that is a pretty nice feature in V6. Thank you )