# Loadable custom markups : how to install the packaged extension

**URL:** <https://discourse.slicer.org/t/loadable-custom-markups-how-to-install-the-packaged-extension/23238>\
**Category:** Development\
**Created:** [May 2, 2022, 2:03pm UTC](https://discourse.slicer.org/t/loadable-custom-markups-how-to-install-the-packaged-extension/23238 "2022-05-02T14:03:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [May 2, 2022, 2:03pm UTC](https://discourse.slicer.org/t/loadable-custom-markups-how-to-install-the-packaged-extension/23238/1 "2022-05-02T14:03:19Z")

</div>

I’m in the very early stages trying to create a loadable custom markups in C++, using extension wizard’s template. I can build the extension and module outside Slicer’s build tree, and create an extension package.

1. When the lib directory of this package is simply copied to Slicer’s lib directory, I can make the custom markups appear in th eMarkups module and use it with this code in Python console :

```auto
d = slicer.vtkMRMLMarkupsCustomNode()
w = slicer.vtkSlicerCustomWidget()
l=slicer.modules.markups.logic()
l.RegisterMarkupsNode(d, w)

```

1. If I install the extension with the Extension Manager pointing to the local file, it gets rightly unpacked in NA-MIC/Extensions-30783/. However, on restart, the custom markups button is not available in the Markups module. And the above code fails, vtkMRMLMarkupsCustomNode is not found.

I expected, perhaps wrongly, that #2 would make the custom markups available transparently. How can we reach a nice development workflow in this context ?

Thank you.

---

<div class="post-metadata">

**Author:** ![chir.set](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chir.set/32/66982_2.png) [@chir.set](https://discourse.slicer.org/u/chir.set)\
**Post date:** [May 2, 2022, 5:22pm UTC](https://discourse.slicer.org/t/loadable-custom-markups-how-to-install-the-packaged-extension/23238/2 "2022-05-02T17:22:45Z")

</div>

Ok, I could solve it by starting Slicer with _–additional-module-paths_ pointing to the lib directory of the module build tree. The ‘Testing’ checking should also be removed in _qSlicerCustomModule::setup()_ and _qSlicerCustomModule::createLogic()_.

By the way, what’s this _qSlicerCoreApplication::AA\_EnableTesting_ flag ? Greping Slicer source and Slicer-build/\*, it appears only in compiled binaries and the qSlicerTemplateKeyModule.cxx files.
