std-entmod | ![]() |
STD-ENTMOD calls entmod and updates the internal entget cache to avoid problems with modified entities and subsequent calls.
STD-ENTMOD is called implicitly by STD-ENTCHG and other functions using STD-ENTCHG.
There's not much need to use (STD-ENTMOD) indeed, (STD-ENTCHG) is easier to use.
;; but better use (std-entchg ele nil 8 "1") instead (if (setq ele (std-entget (std-entsel nil))) (std-entmod (subst '(8 . "1") (assoc 8 ele) ele))) ;; a bad example how NOT to do it, but how to take care. (if (setq ele (std-entsel nil)) (progn (setq lay (std-getlay ele)) ; uses implicitly std-getval ;; stupid way to call (std-entchg ele nil 8 "1") (entmod (subst '(8 . "1") (assoc 8 (entget (car ele)) (entget (car ele)))) ;; now the cache still thinks lay is the layer property ;; we have to call this to force an update on the next access (std-init-entget) (std-print (list "\nold layer: " lay "\nnew layer: " (std-getval 8 ele))) ) )
elist: A valid entget-list suitable to entmod.
An entget-list or nil. ??
None, besides changing the internal *ENTGET-CACHE* variable.
(std-require 'STDENT)
Defined in STDENT