# Enable markup plane visibility programmatically

**URL:** https://discourse.slicer.org/t/enable-markup-plane-visibility-programmatically/18494
**Category:** Development
**Created:** [July 2, 2021, 8:18pm UTC](https://discourse.slicer.org/t/enable-markup-plane-visibility-programmatically/18494 "2021-07-02T20:18:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tpereira](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tpereira](https://discourse.slicer.org/u/tpereira)
#### Post date: [July 2, 2021, 8:18pm UTC](https://discourse.slicer.org/t/enable-markup-plane-visibility-programmatically/18494/1 "2021-07-02T20:18:17Z")

</div>

So I created a markups plane using the code and now I was to make the interaction handles visible. I know you can just select the box in the markups menu but I am trying to automate as much of the process as possible so it can be used by others at my company who have never used slicer. I have spent some time searching but have not found anything on this subject.

This is the code I used to make the plane:  
P = slicer.mrmlScene.AddNewNodeByClass(“vtkMRMLMarkupsPlaneNode”)  
P.SetOrigin([0,0,0])  
P.SetNormal([1,0,0])  
P.SetAxes([100,0,0],[0,100,0],[0,0,100])

---

<div class="post-metadata">

### Author: ![smrolfe](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/smrolfe/32/3659_2.png) [@smrolfe](https://discourse.slicer.org/u/smrolfe)
#### Post date: [July 3, 2021, 9:44pm UTC](https://discourse.slicer.org/t/enable-markup-plane-visibility-programmatically/18494/2 "2021-07-03T21:44:42Z")

</div>

The interaction handles are a property of the display node, so you can use:

```auto
P.GetDisplayNode().SetHandlesInteractive(True)

```

---

<div class="post-metadata">

### Author: ![tpereira](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@tpereira](https://discourse.slicer.org/u/tpereira)
#### Post date: [July 6, 2021, 5:42pm UTC](https://discourse.slicer.org/t/enable-markup-plane-visibility-programmatically/18494/3 "2021-07-06T17:42:36Z")

</div>

Thanks so much worked perfectly!
