Carregando e usando Rotinas Lisp

Although very easy to work with, Lisp - AutoLISP routines are not used by most AutoCAD users because of the lack of knowledge of how to use them. As you'll see in this guide, loading and using Lisp routines is easy!

In order for us to use the same Lisp routine as a working example, I advise that the Lisp Circular.lsp routine be saved in a known folder.
It is a very simple routine, but it is useful to learn how to load and use any Lisp routine you want.

Then do the following:

AutoCAD R14, 2000, 2000i, 2002, 2004 and higher go;

1. Tools. In AutoCAD 2004 enable CAD Manager Window> Pulldowns;

2. Load Application;

3. AutoCAD R14, when Load Application is activated, you will see the Load AutoLisp dialog box, ADS and ARX Files for you to select the file you want to upload. Click File to display the AutoCAD where is Circulo.lsp file that you saved. Select with a click Circulo.lsp the file and click Open. Appears again the AutoLisp Load dialog box, ADS and ARX Files with Circulo.lsp routine selected. Click Load. The dialog box Load AutoLisp, ADS and ARX Files disappear. It seems that nothing happened, but the Circulo.lsp routine will already be loaded into AutoCAD available to be used;
In AutoCAD 2000 and later, after the selection of Load Application, you will see the Load / Unload Applications dialog box. Select with a click Circulo.lsp routine in the folder where you saved. Click Load. Note the Circulo.lsp message succesfully loaded at the bottom left of the dialog box stating that the Circulo.lsp routine has been successfully loaded. Click Close. The Load / Unload Applications dialog box will close and Circulo.lsp routine will already be loaded into AutoCAD available to be used;

4. To begin using the Circulo.lsp routine in the AutoCAD command line type circ and take a Enter;

5. appears on Center Point command line? for you to inform the central point of the circle. You can indicate the center point of the circumference coordinates or click anywhere on the AutoCAD desktop;

6. After informing the central point, the command line appears Circumference? for you to enter the desired perimeter. Type 50, for example, and take a Enter;

7. Ready! It will show the circumference with the perimeter of 50 units.

The routine carried by this method is only available in an AutoCAD section. This means that every time you start the program should load the routine again. You can simultaneously upload as many routines like. There are automatic loading methods routines, but do not discuss here.

Many Lisp routines, when loaded, present in the AutoCAD command line the word that you must type in their own command line so that the routine is started. In other routines Lisp routine name itself is a word that must be entered on the command line so that the routine is started. When none of the previous cases happen to know the word that must be entered before the routine is started, double-click on the routine saves. If the operating system to ask what program to use to open the routine, enter Notepad (notepad.exe). Once open routine, check what is written after defun c :. In our routine Circulo.lsp appear CIRC () in (defun c:.. CIRC () Then, after loading the Circulo.lsp routine whenever you type circ in the command line, the routine will be repeated this procedure to know you should type in the command line, once charged the routine, it applies to all Lisp routines. it is important to note that a Lisp routine always characterized by .lsp extension.

If you want to know more about Lisp routines, go to the CADbracing tutorials pages that there are great tutorials about Lisp for you to delve into the subject or even learn to program in Lisp and be a real lispeiro.

Arq. José Luiz de Bem

Buy Now!
2D Blocks Pack

Buy Now!
3D Blocks Pack

Buy Now!
2D + 3D Combo

Download now!