I'm trying to throw together a little function that will take the xvalue of a list of selected objects, get the greatest xvalue of all objects and substitute that value into the xvalue of said objects. Here's what I have so far.
ename list should be a list of ename objects
(defun lineupText (enamelist / xval puttoval newlist)
(setq xval (mapcar '(lambda (x) (car (cdr (assoc 11 (entget x)))))
enamelist
)
puttoval (car (vl-sort xval '>))
)
(mapcar '(lambda (x)
(setq newlist (subst puttoval
(car (cdr (assoc 11 (entget x))))
(entget x)
)
)
(entmod newlist)
(entupd x)
)
objs
)
)
I'm sure this could be made cleaner, but this is just the first go around. Will someone please tell me why entmod isn't updating the list?
Thank you.