# Clone Markups Node Issue

**URL:** <https://discourse.slicer.org/t/clone-markups-node-issue/12602>\
**Category:** Development\
**Created:** [July 17, 2020, 5:11pm UTC](https://discourse.slicer.org/t/clone-markups-node-issue/12602 "2020-07-17T17:11:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjg](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@mjg](https://discourse.slicer.org/u/mjg)\
**Post date:** [July 17, 2020, 5:11pm UTC](https://discourse.slicer.org/t/clone-markups-node-issue/12602/1 "2020-07-17T17:11:42Z")

</div>

Hello,

I need to clone line, curve, and closed curve nodes. When I use the [method in the script repository](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Clone_a_node) it creates a trace of the original node. Does anyone have a fix or better method? I am using Python.

The leftmost blue line is the original node and the rightmost red line is the clone node (which I have moved to show the trace). I want only the line connecting the two points.

 ![Screen Shot 2020-07-17 at 11.04.11 AM](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/3/83895030289b80fa320b411308dd74e5e506f9f1.png)

Thanks!

---

<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:** [July 17, 2020, 5:37pm UTC](https://discourse.slicer.org/t/clone-markups-node-issue/12602/2 "2020-07-17T17:37:48Z")

</div>

I cannot reproduce this issue with latest Slicer Preview Release. I created a markups line node and ran this script:

```python
nodeToClone = getNode('L')
shNode = slicer.vtkMRMLSubjectHierarchyNode.GetSubjectHierarchyNode(slicer.mrmlScene)
itemIDToClone = shNode.GetItemByDataNode(nodeToClone)
clonedItemID = slicer.modules.subjecthierarchy.logic().CloneSubjectHierarchyItem(shNode, itemIDToClone)
clonedNode = shNode.GetItemDataNode(clonedItemID)

```
