# How to manipulate the orthographic view ruler in code

**URL:** https://discourse.slicer.org/t/how-to-manipulate-the-orthographic-view-ruler-in-code/8238
**Category:** Development
**Created:** [August 30, 2019, 12:41pm UTC](https://discourse.slicer.org/t/how-to-manipulate-the-orthographic-view-ruler-in-code/8238 "2019-08-30T12:41:01Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rat01](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rat01/32/4587_2.png) [@rat01](https://discourse.slicer.org/u/rat01)
#### Post date: [August 30, 2019, 12:41pm UTC](https://discourse.slicer.org/t/how-to-manipulate-the-orthographic-view-ruler-in-code/8238/1 "2019-08-30T12:41:01Z")

</div>

How can I access this ruler in python? I’m trying to do things such as toggle its visibility and change its color and thickness. I know how to do all of these things from the pin menu, but I’d like to be able to control these with a script.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/4/149d3c7f2ea3766f15f587c9d0bfb1245ca72754.png)

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [August 30, 2019, 12:59pm UTC](https://discourse.slicer.org/t/how-to-manipulate-the-orthographic-view-ruler-in-code/8238/2 "2019-08-30T12:59:33Z")

</div>

Like most everything in Slicer, this is managed by a MRML node that you access via the scene. In this case it’s the [view node](https://apidocs.slicer.org/master/classvtkMRMLAbstractViewNode.html). You can get the view node from the threeDView via the layout manager. Is that enough to get you going?

---

<div class="post-metadata">

### Author: ![rat01](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rat01/32/4587_2.png) [@rat01](https://discourse.slicer.org/u/rat01)
#### Post date: [August 30, 2019, 2:30pm UTC](https://discourse.slicer.org/t/how-to-manipulate-the-orthographic-view-ruler-in-code/8238/3 "2019-08-30T14:30:12Z")

</div>

🤩 Yes it is. Thanks for the help.
