You are browsing the archive for Transfer.

Free AutoLisp Routine (Text Transfer)

July 22, 2009 in AutoCAD, CAD


I think it is safe to say that, most of the advance AutoCAD users, knows how to use AutoLisp, they might even know how to do a routine by themselves as well.  Just like some of my colleagues, back in the previous company that I’ve been work with. Some of my colleagues there are AutoLisp fanatics, they even develop an AutoLisp routine of their own. And I can even say that I know how to do a AutoLisp routine, albeit not that complex as some of my colleagues does.

Well, anyway I just like to share an AutoLisp routine that my colleagues shared with us back then. This routine called Text Transfer.

Text Transfer is an AutoLisp routine, that will allow you to copy a series of text content to one place to another. You’ll just have to select the text content that you want to be copied and transfer it to another location, by clicking the text on the selected location or the text you want to replace. 

Copy the set of text below and save it to notepad, but make sure that you put (.lsp) as your file extension, or it wont work, then save it and put it on a folder that you can easily remember.

Text Transfer Lisp

 

(defun c:tt ( / A B)

 (setq A (cdr (assoc 1 (entget (car (entsel “Select TEXT to be TRANSFER: “))))))

   (while (setq B (car (entsel “Select TEXT item to be REPLACE: “)))

    (setq C (entget B))

    (entmod (subst (cons 1 A)(assoc 1 C)C))

   (if (or (= (cdr (assoc 0 C)) “POLYLINE”)(= (cdr (assoc 0 C)) “INSERT”))

   (entupd B)))

 

(princ))

 

text_transfer4

Then, at the command prompt, type APPLOAD, then a dialogue box will pop, then frome there select the routine that you saved, then click the Load button. then you’re all set.

At the command prompt, type Text Transfer or TT, then select the text to be transfer, after selecting, select text item to be replace. Then voila!!…

text_transfer1

text_transfer3

 

Related Posts

Source: PinoyCAD[dot]net | Your Daily dose of AutoCAD Tutorials – Free AutoLisp Routine (Text Transfer)
Go to Source: PinoyCAD[dot]net | Your Daily dose of AutoCAD Tutorials