# What is the event to react to a point location being changed in a MarkupsNode/MarkupsLineNode?

**URL:** <https://discourse.slicer.org/t/what-is-the-event-to-react-to-a-point-location-being-changed-in-a-markupsnode-markupslinenode/45307>\
**Category:** Development\
**Tags:** markups\
**Created:** [December 2, 2025, 6:34am UTC](https://discourse.slicer.org/t/what-is-the-event-to-react-to-a-point-location-being-changed-in-a-markupsnode-markupslinenode/45307 "2025-12-02T06:34:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Wayne](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/victor_wayne/32/80778_2.png) [@Victor\_Wayne](https://discourse.slicer.org/u/Victor_Wayne)\
**Post date:** [December 2, 2025, 6:34am UTC](https://discourse.slicer.org/t/what-is-the-event-to-react-to-a-point-location-being-changed-in-a-markupsnode-markupslinenode/45307/1 "2025-12-02T06:34:02Z")

</div>

Hi,

To react to a point location being changed in a MarkupsLineNode I’ve been using PointModifiedEvent and I am calling one function whenever the location of a point changes. However my callback function is being called even when a MarkupsLine’s point is **hidden**. I don’t want that since my callback function is a bit compute intensive. So what is the event for listening just to a point being modified in a vtkMRMLMarkupsLineNode?

I checked the documentation and couldn’t find one. Do I have no other way than to cache the point location and compare them?

Thanks for your help in advance.

---

<div class="post-metadata">

**Author:** ![mau\_igna\_06](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mau_igna_06/32/9056_2.png) [@mau\_igna\_06](https://discourse.slicer.org/u/mau_igna_06)\
**Post date:** [December 2, 2025, 3:33pm UTC](https://discourse.slicer.org/t/what-is-the-event-to-react-to-a-point-location-being-changed-in-a-markupsnode-markupslinenode/45307/2 "2025-12-02T15:33:52Z")

</div>

Did you try something like this:

```python
def setVisibility(node, visible):
  node.GetDisplayNode().SetVisibility(visible)
  if visible:
    node.DisableModifiedEventOff()
  else:
    node.DisableModifiedEventOn()

```

---

<div class="post-metadata">

**Author:** ![Victor\_Wayne](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/victor_wayne/32/80778_2.png) [@Victor\_Wayne](https://discourse.slicer.org/u/Victor_Wayne)\
**Post date:** [December 4, 2025, 8:55am UTC](https://discourse.slicer.org/t/what-is-the-event-to-react-to-a-point-location-being-changed-in-a-markupsnode-markupslinenode/45307/3 "2025-12-04T08:55:01Z")

</div>

I am not hiding the line point using code. When I hide one of the endpoints of the line using the eye icon in the Markups extension this pointModifiedEvent Triggers.

---

<div class="post-metadata">

**Author:** ![Victor\_Wayne](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/victor_wayne/32/80778_2.png) [@Victor\_Wayne](https://discourse.slicer.org/u/Victor_Wayne)\
**Post date:** [December 4, 2025, 10:34am UTC](https://discourse.slicer.org/t/what-is-the-event-to-react-to-a-point-location-being-changed-in-a-markupsnode-markupslinenode/45307/5 "2025-12-04T10:34:02Z")

</div>

I am not hiding the line point using code. When I hide one of the endpoints of the line using the eye icon in the Markups extension this pointModifiedEvent Triggers.

I need my callback function to be called when one of the control point is modified using the GUI of the Markups module. But not when the point is hidden using the eye icon using the Markups extension
