Cliff Davis
Usenet Archive
- Joined
- Jun 23, 2003
- Messages
- 33
- Reaction score
- 0
I am using the following code to attempt to modify attributes automatically. As soon as it hits the entmod line AutoCAD crashes with:
"INTERNAL ERROR; !u:\global\src\ObjectDbx\DB\IMP\src\dbattr.cpp@466:eWasNotifying" I thought the (if *reaction_flag* .. (setq *reaction_flag* nil) lines were supposed to cover this sort of thing. Is there some other way that I should be going about this? I have spent a great deal of time trying to figure some way to make this work and am out of ideas. Any suggestions and knowledge are greatly appreciated. Thanks Cliff
(setq block_name "ReceptacleDuplex")
(defun test
(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-pers (vlr-object-reactor (list reactor_block) (list reactor_block) '(
vlr-modified . attb_angle_right_reactor)))) (setvar "attreq" att_req)
)
(setq *reaction_flag* t)
(defun attb_angle_right_reactor (notification_object reactor_object parameter_list / attb_angle current_entity attb_list) (princ "\n01\n") (if *reaction_flag* (progn (setq *reaction_flag* nil) (setq current_entity (vlax-vla-object->ename (car (vlr-owners reactor_object)))) (setq attb_angle 0.0) (setq current_entity (entnext current_entity)) (while current_entity (setq attb_list (entget current_entity)) (if (= (cdr (assoc 0 attb_list)) "ATTRIB") (progn (setq attb_list (subst (cons 50 attb_angle) (assoc 50 attb_list) attb_list)) (entmod attb_list) (entupd (entlast)) ) ) (setq current_entity (entnext current_entity)) ) (setq *reaction_flag* t) ) )
)
"INTERNAL ERROR; !u:\global\src\ObjectDbx\DB\IMP\src\dbattr.cpp@466:eWasNotifying" I thought the (if *reaction_flag* .. (setq *reaction_flag* nil) lines were supposed to cover this sort of thing. Is there some other way that I should be going about this? I have spent a great deal of time trying to figure some way to make this work and am out of ideas. Any suggestions and knowledge are greatly appreciated. Thanks Cliff
(setq block_name "ReceptacleDuplex")
(defun test
(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-pers (vlr-object-reactor (list reactor_block) (list reactor_block) '(
)
(setq *reaction_flag* t)
(defun attb_angle_right_reactor (notification_object reactor_object parameter_list / attb_angle current_entity attb_list) (princ "\n01\n") (if *reaction_flag* (progn (setq *reaction_flag* nil) (setq current_entity (vlax-vla-object->ename (car (vlr-owners reactor_object)))) (setq attb_angle 0.0) (setq current_entity (entnext current_entity)) (while current_entity (setq attb_list (entget current_entity)) (if (= (cdr (assoc 0 attb_list)) "ATTRIB") (progn (setq attb_list (subst (cons 50 attb_angle) (assoc 50 attb_list) attb_list)) (entmod attb_list) (entupd (entlast)) ) ) (setq current_entity (entnext current_entity)) ) (setq *reaction_flag* t) ) )
)