Reactor infinate loop

This is my first time using reactors. I thought the *stop_reaction* variable being set to nil was supposed to keep the reactor from going into an infinite loop but it is still locking up at the entmod line. Any suggestions on what I am doing wrong are appreciated. Thanks

(defun attb_angle_right_reactor (notification_object reactor_object parameter_list / attb_angle current_entity attb_list) (if *stop_reaction* (progn (setq *stop_reaction* nil) (setq reactor_object (vlax-vla-object->ename (car (vlr-owners reactor_object)))) (setq attb_angle (rtd (cdr (assoc 50 (entget reactor_object))))) (if (not (or (= attb_angle 300.0))) (setq attb_angle (+ attb_angle 180)) ) (setq current_entity (entnext reactor_object)) (while current_entity (setq attb_list (entget current_entity)) (if (= (cdr (assoc 0 attb_list)) "ATTRIB") (progn (setq attb_list (subst (cons 40 (* (getvar "dimscale") (cdr (assoc

40 attb_list)))) (assoc 40 attb_list) attb_list)) (entmod attb_list) (entupd (entlast)) ) ) (setq current_entity (entnext current_entity)) ) (setq *stop_reaction* t) ) ) )

(defun insert_right_reactor (block_name / attb_angle att_req) (setq att_req (getvar "attreq")) (setvar "attreq" 0) (princ "\nSelect insertion point: ") (command "-insert" block_name "s" (getvar "dimscale") pause nil) (princ "\nSelect rotation angle: ") (command "-insert" block_name (getvar "lastpoint") (getvar "dimscale") "" pause) (vl-load-com) (setq reactor_block (vlax-ename->vla-object (entlast))) (vlr-object-reactor (list reactor_block) (list reactor_block) '((:vlr-modified . attb_angle_right_reactor))) (setq *stop_reaction* t) (setvar "attreq" att_req) )

Reply to
Cliff Davis
Loading thread data ...

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.