Here try this...
I played with object reactor, and I used only < function in diesel expression... So load lisp and type : REACT... From that point until you finish session it should update D whenever H changes, just be sure to use REGEN command after modification...
(defun D:ObjReactor ( owner reactor lstename / h b a )
(setq h (cdr (assoc 1 (entget (vlax-vla-object->ename owner)))))
(setq b (cdr (assoc 330 (entget (vlax-vla-object->ename owner)))))
(setq a b)
(while (setq a (entnext a))
(if (and (= (cdr (assoc 0 (entget a))) "ATTRIB") (= (cdr (assoc 2 (entget a))) "D"))
(entupd (cdr (assoc -1 (entmod (subst (cons 1 (strcat "%%C" "%<$(if,$(<, " h ", 80),60,$(if,$(and, $(>, " h ", 80), $(<, " h ", 125)),80,$(if,$(and, $(>, " h ", 125), $(<, " h ", 250)),100,$(if, $(>, " h ", 250),125))))>%")) (assoc 1 (entget a)) (entget a))))))
)
)
(entupd b)
(princ)
)
(defun c:react ( / collectowners )
(vl-load-com)
(defun collectowners ( / ss bl a al )
(setq ss (ssget "_X" '((0 . "INSERT") (66 . 1))))
(setq bl (vl-remove-if-not '(lambda ( x ) (= (vla-get-effectivename (vlax-ename->vla-object x)) "G_LABELD")) (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))))
(foreach b bl
(setq a b)
(while (setq a (entnext a))
(if (and (= (cdr (assoc 0 (entget a))) "ATTRIB") (= (cdr (assoc 2 (entget a))) "H"))
(setq al (cons (cdr (assoc 5 (entget a))) al))
)
)
)
al
)
(vlr-remove-all)
(setq *TheReactor* (vlr-object-reactor (mapcar 'vlax-ename->vla-object (mapcar 'handent (collectowners))) "Object Reactor" '((:VLR-modified . D:ObjReactor))))
(princ)
)
HTH., M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)