- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi i have a visual lisp code that manages to swap between texts, i didnt create this code but it works:
(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)
)
I have however mtexts and mleaders and i need to swap texts between them , this lisp code works for mtexts only. Anybody knows how to alter this code in order to achieve swapping text between mtext and mleader?
Solved! Go to Solution.