# How to add rectangle in point select?

**URL:** <https://discourse.mcneel.com/t/how-to-add-rectangle-in-point-select/72707>\
**Category:** Rhino for Windows\
**Tags:** rhino, python\
**Created:** [October 9, 2018, 8:51am UTC](https://discourse.mcneel.com/t/how-to-add-rectangle-in-point-select/72707 "2018-10-09T08:51:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xiix.xoox](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/xiix.xoox/32/638532_2.png) [@xiix.xoox](https://discourse.mcneel.com/u/xiix.xoox)\
**Post date:** [October 9, 2018, 8:51am UTC](https://discourse.mcneel.com/t/how-to-add-rectangle-in-point-select/72707/1 "2018-10-09T08:51:28Z")

</div>

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

```

 ![as3](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/6/3/631beea3d30c81395cd88649ee157bdb8d8180aa.png)

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [October 9, 2018, 9:27am UTC](https://discourse.mcneel.com/t/how-to-add-rectangle-in-point-select/72707/2 "2018-10-09T09:27:16Z")

</div>

rs.AddRectangle wants a plane, not a point - as the Help topic indicates.

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/7/3/73dfb39eded698db21c36055820db950ed0d52f0.png)

You will therefore need to supply it with a plane. If it’s to be on the XY plane you can write:

```python
plane=Rhino.Geometry.Plane.WorldXY
plane.Origin=pt
rs.AddRectangle(plane,wi,h)

```

---

<div class="post-metadata">

**Author:** ![xiix.xoox](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/xiix.xoox/32/638532_2.png) [@xiix.xoox](https://discourse.mcneel.com/u/xiix.xoox)\
**Post date:** [October 9, 2018, 9:30am UTC](https://discourse.mcneel.com/t/how-to-add-rectangle-in-point-select/72707/3 "2018-10-09T09:30:32Z")

</div>

Thank you @Helvetosaur . Please check messenger!
