You are browsing the archive for AutoLISP.

How to Load an AutoLISP File

September 4, 2009 in AutoCAD, CAD


If you’re using AutoCAD for long period of time and you know how to use the AutoLISP and the importance of it. You probably know how to load the AutoLISP file in AutoCAD, and you certainly don’t need to read this tutorial. But if happens that you are relatively new on using the AutoCAD and you want to expand your knowledge in this drawing application software, then this tutorial is for you.

AutoLISP a Brief Description

AutoLISP is based on the LISP programming language, which is simple to learn and very usefull in everyway. AutoLISP Applications or routines can interact in AutoCAD in many ways. These routines can prompt the user for input, access built-in AutoCAD commands directly, and modify or create objects in the drawing database. By creating AutoLISP routines you can add discipline-specific commands to AutoCAD. Actually, some of the standard AutoCAD commands are AutoLISP applications. Knowing how to load and use these routines can enhance your productivity.

Loading the AutoLISP

There are two methods to load an AutoLISP file, one is loading it by using the Customize User Interface editor or CUI, the other is by using the command Load Application or simply APPLOAD. Customize User Interface editor can be found by clicking the CAD Manager pulldown menu, then Customize, then Interface (fig.1).

Fig.1Fig.1

Alternatively at the command prompt, key-in CUI. Then in the Customize Interface editor tab, in the Customizations in all CUI files pane, right-click LISP files, then click Load LISP. Then in the Load LISP dialog box, locate and select the AutoLISP file you want to load. Remember only files with the extension LSP can be selected here. After you selected the AutoLISP file that you want, click OPEN.

Fig.2Fig.2

Load Application or simply APPLOAD, using this command is the easiest method in loading an AutoLISP file. You can find this command under CAD Manager pulldown menu on the same place where the Customize User Interface can be found. Or at the command prompt key-in APPLOAD. The good thing in using this method is, not only the AutoLISP files can be loaded but also some other AutoCAD Application files as well. Such as ObjectARX files (arx), VBA files (dvb), ObjectDBX files (dvx), Visual Lisp Executables (vlx), and Fast-load AutoLISP Format (das) [Fig.3].

Fig.3Fig.3

More of this method here in this post Free AutoLISP Routine.

Related Posts

Source: PinoyCAD[dot]net | Your Daily dose of AutoCAD Tutorials – How to Load an AutoLISP File
Go to Source: PinoyCAD[dot]net | Your Daily dose of AutoCAD Tutorials

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

An AutoCAD Hip Tip on Listing Nested XREF Layers

July 21, 2009 in AutoCAD, CAD

Autodesk University

I trust everyone is enjoying a nice summer (or for our friends on the other side of the world, a nice winter!).  I am a Southern California girl and I love the summer (it’s in my DNA).  Any chance to enjoy a nice meal outside is a real treat for me and couldn’t make me [...]

Source: All About CAD – An AutoCAD Hip Tip on Listing Nested XREF Layers
Go to Source: All About CAD

Parametric Design With AutoLISP

July 9, 2009 in AutoCAD, CAD

AutoLISP programming language is one of the ways to increase the effectiveness of AutoCAD applications. This article is intended for those who have not yet had an introduction to AutoLISP. We will introduce the AutoLISP language and explain some simple applications of it. It is obvious that for experienced AutoLISP users, this articles will not [...]
Source: Daily Autocad – Parametric Design With AutoLISP
Go to Source: Daily Autocad