Hi guys,
I wanna make a little modification in that code.
Instead of select text, I'd like to select a attribute.
Can anybody help me out please?
(defun c:t3 (/ txt1 txt2 txt3 pkt1)
(setq txt1 (entsel "Select first text : "))
(setq txt2 (entsel "Select second text : "))
(setq txt3
(strcat
(rtos (- (atof (cdr (assoc 1 (entget (car txt1)))))
(atof (cdr (assoc 1 (entget (car txt2)))))
) 2 2 ) ) )
(if (and (setq pkt1 (getpoint "Where to place difference ? : "))
(if (> (cdr (assoc 40 (tblsearch "STYLE" (getvar "TEXTSTYLE")))) 0)
(command "_.TEXT" pkt1 "" txt3)
(command "_.TEXT" pkt1 "" "" txt3)
))
(princ)
)
)
Thank in advance