Solved! Go to Solution.
Solved by clindner. Go to Solution.
Solved by zubair_exe. Go to Solution.
Any way that you could modify this to keep the text at the same angle it was placed?
Updated:
(defun c:txt2tag (/ oldcmd ss) (setq oldcmd (getvar "CMDECHO")) (setvar "CMDECHO" 0) (if (setq ss (ssget (list (cons 0 "TEXT,MTEXT") (if (getvar "CTAB") (cons 410 (getvar "CTAB")) (cons 67 (- 1 (getvar "TILEMODE"))))))) (progn (foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) (command "-attdef" "" ; settings (cdr (assoc 1 (entget e))) ; tag name "" ; prompt "" ; default value (cdr (assoc 10 (entget e))) ; ins pt (cdr (assoc 40 (entget e))) ; height (cdr (assoc 50 (entget e))) ; rotation ) (entdel e))) (princ "\nError: no text selected.")) (setvar "CMDECHO" oldcmd) (princ))
(defun c:txt2att () (C:txt2tag))
(defun c:mtxt2att () (C:txt2tag))
(defun c:mtxt2tag () (C:txt2tag))
(princ)
Please use the Accept as Solution or Kudo buttons when appropriate
Chris Lindner
CAD Technology Consultant @ onebuttoncad.com
AUGI Board of Directors