Message 1 of 19
Attribute Edit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I got sick of dealing with the attribute editor. You can't just hit Enter to complete the edit. You have to hit the OK button (or Tab + Enter).
So, here's a little way to edit an attribute just like editing text (not mtext)...
(defun c:AE ( / e ent old new dummy) (defun *error* (err) (and dummy (entget dummy)(entdel dummy)) (princ) ) (while (setq e (car (nentsel "\nSelect attribute to modify: "))) (setq ent (entget e)) (setq old (assoc 1 ent)) (setq dummy (entmakex (list '(0 . "TEXT")'(10 0.0 0.0 0.0)'(11 0.0 0.0 0.0) '(7 . "STANDARD")'(40 . 1.0) old '(60 . 1)) ;; invisible ) ) (command "_.ddedit" dummy "") (setq new (assoc 1 (entget dummy))) (entmod (subst new old ent)) (entupd e) (entdel dummy) ) (*error* nil) )
Yes, you might want to add cmdecho and undo control and embellish the *error* function, but I'll leave that to you and your style.
John F. Uhden