Marcel - (if (= nil new) (setq new old)) (progn (entmod (setq elist (subst (cons 40 10.0) (cons 40 oldHT) elist))) (entmod (subst (cons 50 new) (cons 50 old) elist))) - the both entmods use the same list with the current substitution. For clarity and speed you may want to make all the necessary substitions to the data list first then use a single entmod:
(setq elist (subst (cons 40 10.0) (cons 40 oldHT) elist)
elist (subst (cons 50 new) (cons 50 old) elist)
)
(entmod elist)
Peter