# Show/hide output model in Python script

**URL:** https://discourse.slicer.org/t/show-hide-output-model-in-python-script/25988
**Category:** Development
**Created:** [October 30, 2022, 1:56pm UTC](https://discourse.slicer.org/t/show-hide-output-model-in-python-script/25988 "2022-10-30T13:56:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![seanchoi0519](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/seanchoi0519/32/10354_2.png) [@seanchoi0519](https://discourse.slicer.org/u/seanchoi0519)
#### Post date: [October 30, 2022, 1:56pm UTC](https://discourse.slicer.org/t/show-hide-output-model-in-python-script/25988/1 "2022-10-30T13:56:42Z")

</div>

Hi,

I’m trying to implement a function where the user is able to show and hide the output model compared to the input model. For example, when a user presses 1, the input model (before the effect of the dynamicModel) shows. When a user presses 2, the input model gets cut by the planes, and the output node is then shown.

What would be the easiest way to do this?  
I’ve not dealt with vtkMRMLDynamicModelNode so this is quite new to me. My initial thought was to use SetVisibility function to show/hide the DisplayNode but then dynamic model node does not seem to have a displaynode

---

<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: [October 31, 2022, 7:32pm UTC](https://discourse.slicer.org/t/show-hide-output-model-in-python-script/25988/2 "2022-10-31T19:32:20Z")

</div>

Dynamic modeler nodes specify the operation type and all inputs, and outputs. You thought it correctly that you need to call `SetVisibility` of model display nodes. You can get the display nodes by calling `GetDisplayNode()` method of the input and output model nodes referenced in the dynamic modeler node.
