What to do with Visual LISP files from the Internet
Bill Kramer – 1998
The Visual LISP programs you download from the Internet are meant to improve your productivity when running AutoCAD. They will only work with AutoCAD and will not work with AutoCAD LT.
The code from this web site has only been tested using AutoCAD and may or may not be suitable for other CAD systems supporting an AutoLISP like language option.
((((((( ? )))))))
The following are the most frequent questions I've heard regarding
Visual LISP utilities on the web.
Just what are Visual LISP files? Visual LISP files are typically ASCII text files with an LSP extension. This means you should be able to edit them using NotePad or some other text editor software. My favorite text editor is the VLIDE provided with AutoCAD. Sometimes, LISP files downloaded from the Internet are encrypted or protected. These files cannot be manipulated using a text editor. The free Visual LISP utilities provided at this web site are ASCII text files. The reason they are provided that way is so that you can integrated them into other Visual LISP programs of your own design.
Where do I put them? The first step is to download the program code and save it as a text file using the extension ".LSP". Some browsers will download the code to the viewer and it must be saved from there. Do NOT select the HTML option when saving the LSP file; select a basic MS-DOS text file instead.
Applications supplied may contain multiple functions. They should all be saved together in the files provided. AutoLISP files may contain as many functions as desired.
If you only have a few programs, they can be stored in the same directory as AutoCAD’s executable modules. If you plan to use a large library of Visual LISP programs, you should create a subdirectory to house them and keep them all there. Another popular location to store the Visual LISP program files is in the support directory underneath the main AutoCAD program directory.
How do I get them into AutoCAD? Visual LISP functions are loaded into memory inside AutoCAD. Visual LISP code is loaded using the (LOAD) expression. Everything in Visual LISP is surrounded by parentheses and it is important to remember that when loading the functions into the system. If you just type LOAD at the AutoCAD command line, the system thinks you are asking to load a shape definition file.
The APPLOAD command is another way to load Visual LISP files. Type APPLOAD at the AutoCAD command line to display a dialog box of available functions to be loaded. If the one you want is not in the list, select the browse button to locate and then load it.
How do I start the Visual LISP programs inside AutoCAD? The answer to this question varies a great deal. Some Visual LISP programs run right away as you load them. Others require that you type in the name of a command to get it started. The utilities from this web site provide additional information such as command names to use when they are loading.
You can also start the functions by typing in their full name surrounded by parentheses. For example, if you download the function set named JOINER.LSP and load it, you can type JOINER or (C:JOINER) at the command line to start the function. Obviously the version without parentheses is preferred when manually typing. The longer version is provided as a method of starting the function inside your own Visual LISP function.
How do I integrate them with my menu? Typing the (LOAD) expression and even APPLOAD is cumbersome and most AutoCAD operators would prefer not to use that method. An alternative is to integrate the load and run into a menu entry for AutoCAD. The menu entry commands would consist of an LISP expression itself to get the functions loaded and started.
Menu customization is accomplished using the menu customize utility in AutoCAD. Icon menu (toolbar) or pull down menus will greatly improve your ability to use these enhancement tools and offer them to others not as bold to learn these things.
Using the JOINER function as an example, the following menu entry will check to see if the primary function already exists. If it does not exist it is loaded from the "/myLISP/" directory. Then the command function is started.
[Joiner]^C^C^C^P(if (null C:JOINER)(load "/myLISP/JOINER"));JOINER
What if I want some changes done to these programs? Learn Visual LISP. It is a very powerful tool that will repay your efforts several times over as you create a custom system to your needs.
If you don't want to learn how to program AutoLISP, then you can contract a consultant, such as us, to do the custom work for you. It is best if you have a very clear idea of what you want the program to do before calling the programmer and spending their time brain scratching.
Can I redistribute programs written using these utilities? Not as they are. You must make substantial modifications (over 20%) to redistribute them. If you are creating a program for the public to use then you should be capable of doing that task with ease. If you want to use them as is, you must license the programs from the authors accordingly.
Keep on programmin’
