Here is a good quickie that lets you swap text objects – even Attributes that are within the same block and even attributes within different blocks. (Note: the “swapping” of attributes is actually only swapping the “value” of the and not the prompt…)
Here’s how:
- TV <enter>
- Select the 1st text object to be swapped
- Select the second text object…
~enjoy
;Tip1507: TV.LSP Trade Values (c)1999, Leland Leahy (defun c:TV (/ T1 EL1 TV1 T2 EL2 TV2) (setvar "cmdecho" 0) (setq T1 (car (nentsel "\nPick first text string: ")) EL1 (entget T1) TV1 (cdr (assoc 1 EL1)) T2 (car (nentsel "\nPick second text string: ")) EL2 (entget T2) TV2 (cdr (assoc 1 EL2)) EL1 (subst (cons 1 TV2) (assoc 1 EL1) EL1) EL2 (subst (cons 1 TV1) (assoc 1 EL2) EL2) ) (entmod EL1)(entupd T1)(entmod EL2)(entupd T2) (setvar "cmdecho" 1) (prin1) )