# Issue when enabling the new interaction transform handler using script

**URL:** <https://discourse.slicer.org/t/issue-when-enabling-the-new-interaction-transform-handler-using-script/36509>\
**Category:** Development\
**Tags:** transforms, python\
**Created:** [May 31, 2024, 1:24am UTC](https://discourse.slicer.org/t/issue-when-enabling-the-new-interaction-transform-handler-using-script/36509 "2024-05-31T01:24:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chz31](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chz31/32/77363_2.png) [@chz31](https://discourse.slicer.org/u/chz31)\
**Post date:** [May 31, 2024, 1:24am UTC](https://discourse.slicer.org/t/issue-when-enabling-the-new-interaction-transform-handler-using-script/36509/1 "2024-05-31T01:24:58Z")

</div>

Hi,

I met a strange issue when I tried to enable interaction transform handler using script using the newest preview Slicer 5.7.0-2024-05-28 in Mac.

The command `interactionTransformNode.GetDisplayNode().SetEditorVisibility(True)` can only enable the interaction transform handler when I switched to the `Transforms` module.

If I just created a blank vtkMRMLTransform node in the Data module, add the volume to the transform, then do `interactionTransformNode.GetDisplayNode().SetEditorVisibility(True)`, it would not find `SetEditorVisibility` attribute. For example:

```auto
headNode = slicer.util.getNode('MRHead')
interactionTransformNode = slicer.mrmlScene.AddNewNodeByClass('vtkMRMLTransformNode', "interaction_transform")
headNode.SetAndObserveTransformNodeID(self.interactionTransformNode.GetID())
interactionTransformNode.GetDisplayNode().SetEditorVisibility(True)

```

It would report:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/b/2bb158fe05f5e9412496aef054dac7fdf3194a89.png)

Switching to the Transform module and the `SetEditorVisibility(True)` ran well to enable the interaction handle (see Python console).

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/b/3bb08974911db1ae327aa1aa3dba18d4ec725e82.jpeg)

I do not currently have access to Windows, but I believe I did not encounter an error in Windows.

---

<div class="post-metadata">

**Author:** ![Sunderlandkyl](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sunderlandkyl/32/79987_2.png) [@Sunderlandkyl](https://discourse.slicer.org/u/Sunderlandkyl)\
**Post date:** [May 31, 2024, 2:09am UTC](https://discourse.slicer.org/t/issue-when-enabling-the-new-interaction-transform-handler-using-script/36509/2 "2024-05-31T02:09:16Z")

</div>

You need to create the display node before trying to access it.

```auto
interactionTransformNode.CreateDefaultDisplayNodes()

```

---

<div class="post-metadata">

**Author:** ![chz31](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chz31/32/77363_2.png) [@chz31](https://discourse.slicer.org/u/chz31)\
**Post date:** [May 31, 2024, 6:14pm UTC](https://discourse.slicer.org/t/issue-when-enabling-the-new-interaction-transform-handler-using-script/36509/3 "2024-05-31T18:14:01Z")

</div>

Thank you! It’s been solved!
