# Clone markups node

**URL:** <https://discourse.slicer.org/t/clone-markups-node/8635>\
**Category:** Support\
**Created:** [October 1, 2019, 3:29pm UTC](https://discourse.slicer.org/t/clone-markups-node/8635 "2019-10-01T15:29:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ezemikulan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ezemikulan/32/4850_2.png) [@ezemikulan](https://discourse.slicer.org/u/ezemikulan)\
**Post date:** [October 1, 2019, 3:29pm UTC](https://discourse.slicer.org/t/clone-markups-node/8635/1 "2019-10-01T15:29:07Z")

</div>

Hi, I need to clone a markups node but I can’t find a way to do it. I know that for volumes there is (using python):

> slicer.vtkSlicerVolumesLogic().CloneVolume()

I would like to know if there’s a similar method for markups, as I would like to make multiple copies of a set of markups and apply different transforms to them.

Thanks for your help. Cheers,

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [October 1, 2019, 3:41pm UTC](https://discourse.slicer.org/t/clone-markups-node/8635/2 "2019-10-01T15:41:33Z")

</div>

Example code for this can be found here: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Clone\_a\_node](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Clone_a_node)

```
# Get a node from SampleData that we will clone
import SampleData
nodeToClone = SampleData.SampleDataLogic().downloadMRHead()

# Clone the node
shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)
itemIDToClone = shNode.GetItemByDataNode(nodeToClone)
clonedItemID = slicer.modules.subjecthierarchy.logic().CloneSubjectHierarchyItem(shNode, itemIDToClone)
clonedNode = shNode.GetItemDataNode(clonedItemID)
```

---

<div class="post-metadata">

**Author:** ![ezemikulan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ezemikulan/32/4850_2.png) [@ezemikulan](https://discourse.slicer.org/u/ezemikulan)\
**Post date:** [October 2, 2019, 7:50am UTC](https://discourse.slicer.org/t/clone-markups-node/8635/3 "2019-10-02T07:50:12Z")

</div>

Thanks, it works perfectly.
