hello
due to the text flips when converting to dwg,
I wrote a script to fix text plane,it works when single textobj selected,
but if i select multiple text objects ,it failed.
I don’t know why, please help me, thanks.
import Rhino as rh
import scriptcontext
import rhinoscriptsyntax as rs
def FixTextPlane():
msg = "Select texts to justify text plane"
text_id = rs.GetObjects(msg,rs.filter.annotation)
if not text_id: return
if rs.IsText(text_id):
textpoint = rs.TextObjectPoint(text_id)
rs.TextObjectPlane(text_id,rs.WorldXYPlane())
rs.TextObjectPoint(text_id,textpoint)
else:
return
if name==“main”:
FixTextPlane()
3 posts - 2 participants