I use text dot is with of rectangle and height don’t chang. Point i select with mouse. I can’t add rectangle in point chose (cannot be converted to a Plane). Why not? and how can fix it.
import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
def DoSomething(text):
gp = Rhino.Input.Custom.GetPoint()
gp.SetCommandPrompt("Pick a point")
get_rc = gp.Get()
if gp.CommandResult() != Rhino.Commands.Result.Success:
return
print gp.Point()
pointadd=gp.Point()
wi=int(text)
h=2400
pt = rs.coerce3dpoint(pointadd)
rs.AddRectangle(pt,wi,h)
if __name__=="__main__":
dot=rs.GetObject("Lay cot",8192)
textdot=rs.TextDotText(dot)
text=textdot[1:]
print text
DoSomething(text)
#DoSomething()