# Still learning: how to access behaviour of another module in my module

**URL:** <https://discourse.slicer.org/t/still-learning-how-to-access-behaviour-of-another-module-in-my-module/809>\
**Category:** Development\
**Created:** [August 2, 2017, 5:31pm UTC](https://discourse.slicer.org/t/still-learning-how-to-access-behaviour-of-another-module-in-my-module/809 "2017-08-02T17:31:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [August 2, 2017, 5:31pm UTC](https://discourse.slicer.org/t/still-learning-how-to-access-behaviour-of-another-module-in-my-module/809/1 "2017-08-02T17:31:19Z")

</div>

Hello, I’m still learning how to write my own modules. I would like to replicate the behaviour of the “Show DICOM Browser” button from the DICOM module in a button placed in my own module. I tried using the “Record Macro” feature to get a hint, but I didn’t find it useful. How should I proceed?  
Thanks.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [August 2, 2017, 5:44pm UTC](https://discourse.slicer.org/t/still-learning-how-to-access-behaviour-of-another-module-in-my-module/809/2 "2017-08-02T17:44:11Z")

</div>

This python code will open the browser:

```
slicer.modules.dicom.widgetRepresentation()
slicer.modules.DICOMWidget.enter()

```

You need the first line as well, because it makes sure the objects are instantiated.

---

<div class="post-metadata">

**Author:** ![mschumaker](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mschumaker/32/1395_2.png) [@mschumaker](https://discourse.slicer.org/u/mschumaker)\
**Post date:** [August 2, 2017, 6:57pm UTC](https://discourse.slicer.org/t/still-learning-how-to-access-behaviour-of-another-module-in-my-module/809/3 "2017-08-02T18:57:37Z")

</div>

> [@cpinter](#):
>
> slicer.modules.dicom.widgetRepresentation()  
> slicer.modules.DICOMWidget.enter()

Fantastic, thank you.
