Modify Reactor (vlr-modified) does not react when editing parameters of Cogo Point in Property tab

Modify Reactor (vlr-modified) does not react when editing parameters of Cogo Point in Property tab

jakob_holmquist
Enthusiast Enthusiast
355 Views
2 Replies
Message 1 of 3

Modify Reactor (vlr-modified) does not react when editing parameters of Cogo Point in Property tab

jakob_holmquist
Enthusiast
Enthusiast

Hi!

I have coded a reactor that is meant to react as soon as a cogo point is modified in any way. It works great when the cogo point is edited with commands, such as Move or when moving the cogopoint by moving the grip. But when changing for example the elevation parameter in the property tab the reactor does not react to this modification of the cogo point.

 

When letting the reactor watch a AutoCAD point object instead, the reactor fires when changing the point's x, y or z values in the property tab. 

 

Also, any changes to the Cogo Points in the Point editor panorama also go unnoticed.

 

Why does these changes to the cogo point fly under the radar so the reactor does not notice them? How can I solve this? Is it even possible? 

jakob_holmquist_1-1713180829749.png

Properties that when changed fire the reactor for Point objects.

 

 

 

jakob_holmquist_0-1713180773750.png

Properties that when changed do not fire the reactor for Cogo Points.

jakob_holmquist_2-1713181735534.png

 

Simple example code:

(defun c:cc ()
(setq pt1obj (vlax-ename->vla-object (get-cogo "\nSelect a cogo point: ")))

(setq point_reactor
        (vlr-object-reactor (list  pt1obj)
                            (list (cons "Pt1" pt1obj)
                                  )
                            '((:vlr-modified . change_point))))
 (princ)
);end cc

(defun change_point (notifier_object reactor_object parameter_list)
  (princ "\nThe Cogo Point was modified")
);end defun

(defun get-cogo (string)
  (setq obj (car (entsel string)))
  (if (not (eq "AECC_COGO_POINT" (cdr (assoc 0 (entget obj)))))
      (progn
        (prompt "\nSelected object is not a cogo point. Please select a cogo point.")
        (get-cogo))
    obj)
);end defun

 

0 Likes
356 Views
2 Replies
Replies (2)
Message 2 of 3

Sea-Haven
Mentor
Mentor

When you edit the cogo point to a new elevation why do you need a reactor ? If it has a civ3d label style attached it should update automatically. Same with X Y. 

0 Likes
Message 3 of 3

jakob_holmquist
Enthusiast
Enthusiast

I am coding a functionality regarding Cogo points that needs to know whenever a Cogo point has had it's coordinates modified, no matter for what reason. The details regarding the functionality is irrelevant to the issue, but suffice to say that I draw lines from one point to another that should update whenever a cogo point is moved.

 

However, this is more of a principality issue: even though I have a reactor that should trigger whenever a certain Cogo point is modified, for some reason the reactor doesn't notice modifications made in a few specific ways. My guess is that it is due to the objects being Civil 3D objects, but I really don't know. I want to find a way to work around this.