# Markup gui control via script

**URL:** <https://discourse.slicer.org/t/markup-gui-control-via-script/31041>\
**Category:** Support\
**Tags:** python, gui\
**Created:** [August 8, 2023, 8:10am UTC](https://discourse.slicer.org/t/markup-gui-control-via-script/31041 "2023-08-08T08:10:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ylim](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ylim/32/68611_2.png) [@Ylim](https://discourse.slicer.org/u/Ylim)\
**Post date:** [August 8, 2023, 8:10am UTC](https://discourse.slicer.org/t/markup-gui-control-via-script/31041/1 "2023-08-08T08:10:41Z")

</div>

Hi,  
Would like to be able script the (a)options to snap at stl, (b) enable length measurement and (c) resample (with defined no. of points) via the markup module? please advise.

 ![SlicerApp-real_Q6IqC8JfsI](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/e/be3175cfa0d4cf11ec605969c2d0e470986bc383.jpeg)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [August 9, 2023, 5:41pm UTC](https://discourse.slicer.org/t/markup-gui-control-via-script/31041/2 "2023-08-09T17:41:26Z")

</div>

All these options can be configured by calling `Set...` methods of the MRML node (markup node or its display node). See more details and examples in the [PerkLab Slicer Programming tutorial](https://github.com/PerkLab/PerkLabBootcamp/blob/master/Doc/day3_2_SlicerProgramming.pptx?raw=true).
