# How can I know which control point is moved?

**URL:** <https://discourse.slicer.org/t/how-can-i-know-which-control-point-is-moved/28492>\
**Category:** Support\
**Created:** [March 21, 2023, 8:14am UTC](https://discourse.slicer.org/t/how-can-i-know-which-control-point-is-moved/28492 "2023-03-21T08:14:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnzzll](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/nnzzll/32/16350_2.png) [@nnzzll](https://discourse.slicer.org/u/nnzzll)\
**Post date:** [March 21, 2023, 8:14am UTC](https://discourse.slicer.org/t/how-can-i-know-which-control-point-is-moved/28492/1 "2023-03-21T08:14:44Z")

</div>

I am developing a C++ extension and my code goes like:

```auto
qvtkConnect(fidNode, vtkMRMLMarkupsFiducialNode::PointEndInteractionEvent, this, SLOT(onPointMoved()));

```

Since I have to do some operation according to control point’s position, how can I know which control point of `fidNode` is moved in slot function `onPointMoved()`?

---

<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:** [March 21, 2023, 11:12am UTC](https://discourse.slicer.org/t/how-can-i-know-which-control-point-is-moved/28492/2 "2023-03-21T11:12:31Z")

</div>

This works during the interaction, not sure what happens right after  
`markupIndex = int(caller.GetAttribute('Markups.MovingMarkupIndex'))`
