If you have some lisp routines that you would like to have available when you are working in various drawings here is a way to have them available in all your drawings. This method of adding the .lsp files to a tool palette makes them available and will load them only when they are needed. Other methods like using an acad.lsp or acaddoc.lsp will load all the lisp files upon each drawing that you open and depending on how many lisp files you have may be a little slow.
First place your lisp files and button images into a folder that will be a stable environment where it will not accidentally get moved or erased. Button images can be of various file types and sizes. In this example I have used 32×32 pixel bitmaps (.bmp).
Right click in the Tool Palette and select “New Palette” to place the new tools on. This will create a new tab on the tool palette… Give the new palette a unique name.
We now need to populate the new palette with content. The easiest way to do this is to simply drag something from the drawing area onto the palette and then modify its properties. Below, I have created a line and then dragged it onto the palette.
To change the tool’s properties from being just another line tool, right click and select “Properties”
The 5 areas below need to be changed in order for this tool to be the new custom tool:
- Give the tool a unique and meaningful name
- Give the new tool a meaningful description so that when you hover over the tool it will tell you what it does
- Change the “Use flyout” option to “No”
- Fill out the command string to specify the path to where the .lsp file resides and what the command call is in order to start the lisp routine.
- Give the new tool a cool new image/button
To define an image to use as the button, simply right click in the square area in the upper left and select “Specify image” and then browse to the image, select it and click ok.