LISP Routines

Please feel free to download any of the following LISP routines.

CAD CORNER PROVIDES THESE PROGRAMS "AS IS" AND WITH ALL FAULTS. CAD CORNER SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. CAD CORNER DOES NOT WARRANT THAT THE OPERATION OF THESE PROGRAMS WILL BE UNINTERRUPTED OR ERROR FREE. USE AT YOUR OWN RISK.


Lisp Routines for Download

2D Door.lsp A small program that draws a 2D door on your floor plan.
2D Win.lsp A small program that draws a 2D window on your floor plan.
3dcabn.zip THIS PROGRAM WILL DRAW A CABINET GIVEN THE WIDTH, HEIGHT, DEPTH, THICKNESS OF MATERIAL USED, COUNTERTOP OVERHANG, THICKNESS OF COUNTERTOP, AND HEIGHT OF THE SHELF. THIS PROGRAM WILL ALSO SET A "CABINET" LAYER AT THE BEGINNING.
3dhome.zip Try out the world's most popular Home Design software before you buy.
This is the evaluation version of Home Design 3D,
3dlisp.zip A series of 3d LISP routines including 3dcabnas described above, 3dwin which draws a 3d window, 3d pedit, 3d rotation, 3d pline and numerous other 3d lisps.
90lsp.zip Contains 90 different lisp routines including routines such as Flatten, a series of layer commands and much much more!
Add.lsp AutoCAD built in calculator.
Al2.lsp This program creates leaders with squiggly lines.
Archcalc.zip This function simulates a simple "feet-and-inch" calculator that accepts input in standard AutoCAD Architectural units. It provides addition, subtraction, multiplication, division and conversion operations for linear feet, inches, and fractions of inches, and for square foot values. The units in the current drawing must be set to #4-Architectural for proper operation.
Archlisp.zip A series of architectural lisp commands such as; dsda.lsp - Draws a double swing, double acting door, dssa.lsp - Draws a double swing, single action door, gd.lsp - Draws a garage door, ceiling.lsp - Draws a ceiling grid, and many other routines.
Arcl.lsp This simple lisp routine draws that an arc leader. The arc size is directly related to the dimasz variable, however, it prompts for a size and defaults to dimasz. Larger sizes useful for multiple pipe rack widths.
Arenam.zip Routine to automatically, rename any block listed in "lookup_block" in ("oldname" . "newname") format. An error will occur if both "oldname" and "newname" exist in the same drawing.
Atc.zip This program takes any number of arcs and converts them into circles. Each circle is a new object with all the properties of the arc it replaces. Non-arc objects are ignored.
Atext.zip Draws center aligned text along an ARC. The start point of the text is the ENDpoint of the ARC closest the pick point.
Attedit.zip Attribute edit to change the attribute name.
Autopk.zip Numerous entity editing commands built into a single lisp routine.
Autoweld.zip An autolisp routine complete with menu and toolbar for all your welding detailing needs.
Awelds4.zip An autolisp routine complete with menu and toolbar for all your welding detailing needs. Unlike Autoweld.zip, this lisp routine doesn't use a collection of blocks for welding symbols.
Bank.lsp Draws top of slope triangle, then alternating scalloped line to toe of slope (as indicated).
Batt.rar Draws architectural batt insulation.
Batt3.rar See Batt.rar above.
BC.lsp Program to count specific blocks in a drawing.
Best Of Lisp.rar This is a "Best of Lisp" collection containing 13 lisp routines. Various different Lisp routines from a lisp that opens windows explorer to the current drawing directory, to a lisp routine that rotates a selection to a entity of your choosing.
BK.lsp Will break a line at an intersection with another line. Automatically sets OSNAPs to intersect.
BL.lsp Used to create building lines, etc. Works in polyline mode. Allows re-use or reset of snapangle, and forces orthomode.
Blkrpt.zip The routine counts the number of inserts for each block, on your drawing, and develops a report.
BlockExtender.zip BlockExtender is a brand new technology that allows you to turn almost any block into a custom entity on the fly.
Bolthead.lsp This program will draw a bolthead (hexagon and circle) using a pline after the user has supplied the insertion point and nominal shank diameter of the bolt.
Breakpoint.lsp Breakpoint.lsp is a simple lisp routine that allows you to simply type in "BP" at the command prompt and start the break  command it begins the break command to break an entity at a point of your choosing.
Brtoolsx.lsp Series of lisp routines in a single lisp file. Routines such as; jt - Sets current "text style" to that of the selected font, mid2 - Sets a point half-way between two given points, bb - Breaks a line at an user's location, and a number of other routines .
Bsc51.zip Block Scale allows you to scale a selection set of block
insertions, but scales each insertion individually.
Bscale.lsp Bscale.lsp is a lisp program that will allow you to scale a number of block at a scale that you specify. Each block will be scaled with a basepoint at the block's insertion point.
Building.rar A series of lisp routines that draw building entities such as doors and windows.
Bylaybk.zip Changes the block definitions to BYLAYER . Will skip all XREF & XREF dependent blocks.
C2p.lsp C2p.lsp is a simple lisp program that will allow you to, in a single step, change a line or arc into a polyline.
Cabine.zip This file contains a parametric program that creates 2D representations of cabinet faces.
CADTools.rar A collection of bonus AutoCAD tools with 3 individual toolbars; Bonus Standard Toolbar, Bonus Text Tools, and Bonus Layer Tools.
Calc.zip A drawing of a calculator pops up. You pick it's buttons, or use the keyboard, for input. Numbers are displayed and evaluated just like a real calculator. It supports +, -, *, /, ^ (exponent), order of operations and brackets.
Casement.zip A sample casement window program.
Ceiling.rar A great lisp for drawing ceiling grids without having to trim any lines.
Cgrid.zip A routine that draws a ceiling grid centered on the user defined room.
CHG3.lsp CHG creates a numbered menu of the selected entities properties, and then prompts the user to select the number of the property to modify. CHG then prompts for a new value for that property, which may be a point (list), real, integer, or string.
Chgtext.lsp This program will allow the user to select an existing text from the screen and then select text using a selection set the change this text to the same height and style of the original source text.
Cht.lsp Lisp to Standardize/modify selected text in a dwg
Civil.zip Program to note the bearing and distance between two points or the two ends of a line for Architects and Civil Engineers who don't have a cogo package and need to label boundary lines you can change the layer names, colors, and linetypes as you see fit
Civili.zip Draws a boundary line and labels the distance and bearing using the current layer and text height.
Clock.zip A refined analogue clock for AutoCAD.
ct.lsp This program is used to copy text and then prompt to change the text.
Cumdist.lsp This routine is just like the Autocad Distance command with the exception that it allows you to pick more than 2 consecutive points. The routine will display the cumulative distance and the distance between the last two points picked on the command line.
Cusson.rar A handy lisp routine that draws windows of different styles and different widths and heights based on user input.
Delroutines.rar A group of lip routines for when you receive a drawing file from another firm and you want to erase all the text, dimensions leaders and mtext.
Del-layer.lsp A great routine for when you need to clean a drawing up and delete layers without complications of still having entities on the layer that you can't find.
DetailBook.zip The Detail Book is a drawing library organizational tool written for AutoCAD and IntelliCAD users who have generated a large number of typical details and need a way to access and manage them in an organized and timely fashion.  It allows you to separate details into categories for easy access, yet still keep all your blocks in the same place.
Distbear.zip

Routine creates a text entity that specifies the distance (length) and bearing (angle) of a select line or pline segment.  Used in surveying and map making.

Dof.zip Function creates an offset to either side of the selected entity and erases the original.
Door.rar Draws a 2D door. Similar to 2D door.lsp above.
Doorac.zip Here's nice little door swing lisp which uses PLINE to draw a door, once the door is drawn it will trim the wall to the door.
Dp2.lsp Program to select required text (on a layer called LEVELS, this can be changed if you have a little Autolisp experience) and change the numerical part of each text item by adding or subtracting a user-entered value.
DTWall.rar A great architectural lisp routine to draw walls. Comes complete with predefined wall types and an easy to use interface.
DWGguardTNT.zip DWGguard TNT could be a valid tool to protect our work every time we would like to prevent users to modify an Autocad drawing while they are viewing it.
Edits.lsp Various edit routines which includes color change, text change and text width change.
Edu.lsp Edit your units' precision without going into your format menu.
Extrude_p.lsp This program copies a selected object to be extruded and places it onto a layer called profile and then extrudes the original so the user always has a backup of the extrusion in wireframe.
Fillet0.lsp A great lisp that fillets a 0 radius and sets the radius back to the previous radius setting.
Fixblock.zip Puts all of a blocks sub-entities on layer 0 with color and linetype set to BYBLOCK. The block, itself, will remain on its' original layer.
Flat.lsp Program that flattens 3d entities to 2d.
Flrjst.zip This is a program that draws a tji floor joist or steel beam with faces.
Freehand.lsp This lisp is more for architectural drawings that you want to present. This gives the drawing the affect that it was drawn by hand by putting a little bit of a "squiggle" to the lines and extends the ends of lines past each other.
Grabbag.zip A grab bag full of great lisp routines. Too many to mention but there's plenty of layer, text, and block routines and much much more.
Handylsp.zip Another grab bag full of more great lisp routines. Just like above this group of lisps has way too many functions to lisp but there's plenty of useful ones in there. Just download it and check them all out!
Howfar.zip A useful and powerful extension of the distance command.
HVAC Suite.rar A full suite of lisp routines and blocks for designing and  drawing HVAC systems.
Int.zip Int.lsp is a package of interior elevation drawing utilities designed to
remove the drudge work from an arduous task.
Join2.zip

Routine to join 2 polylines together.  User is prompted to select 2 plines, which are joined by drawing a line between the ends closest to the pick point, then joining them with the PEDIT command.  The first pline picked controls the layer, color, ltype, etc.

Le.lsp Lisp routine for drawing a line and then entering text.
Learn.lsp This is a lisp routine that will write you a lisp code based on your input in autocad. However, I have not figured out how to end the user input for this code. If anyone out there can figure out how this properly works please drop me a line and let me know. Thanks!
Library.zip

These are just a few of the top lisp routines you should check out in the library; HFACE.lsp -Create 3dfaces to hide entities around text, Enedit.lsp-Create a selection set quickly and easily, then take advantage of its powerful editing routines. Var.lsp -Creates a text file that records all the settings in the current drawing. When the restore button is pressed var.lsp quickly restores those saved settings. Spurge.lsp-purge command without verifying every purge. Brktxt.lsp-Break a line of text and either add it to another line or create a new line of text with it. Gpedit.lsp-Edit a polylines globally. Asview.lsp-View a text file and print it from Autocad. Clean.lsp -Finds all null text and text containing only
spaces in your drawing so you can easily get
rid of them.

Lisput.zip

Another grab bag of useful lisp utilities that includes Breakf.lsp -is a utility that allows the user to pick a line, polyline or an arc and break it at a specified point by only picking the location once rather than 2 times, like the Autocad version Break/F. Flayer.lsp - A utility that allows a user to Freeze, Delete, Turn off or make current the layer of a selected entity. Iang.lsp - A utility that calculates the angle between 2 intersecting lines by allowing the user to pick the lines. Lay.lsp - a utility that allows the user to save or restore a list of layers to a drawing. Mtrim.lsp - a list routine that allows the user to trim multiple entities with on pick. Stamp.lsp - A utility that places a stamp it a specified location that contains the user name, the modification date and time and the drawing name. Sum.lsp - a utility that allows the user to add a list of numeric text strings contained in a drawing and place the total at a specified location on the screen.

llpsite.rar A group of tons of lisp routines complete with toolbars. This lisp collect has various lisp routines for layers, text, attributes, etc...just load it up and give it a try!
Lmatch.lsp Change layer to selected entity.
Lotno.lsp Creates lot numbers in order, on the current layer with current text style. It will prompt you at the command line for the beginning lot number.
Ls.lsp Lisp routine for setting layers.
Lt.zip

Program to process layers quickly based on object selection.

Master.zip Another collection of various text editing, layer editing and other lisp routines placed into a neat and tidy toolbar and menu.
Matchtxt.lsp Matches the text of one text entity to be the same as a selected text entity.
MBA.rar A Series of commonly use lisp routines placed into a neat and tidy toolbar package.
Mech2lsp.zip This file is a collection of AutoLisp routines that are to use while doing mechanical drafting and design. Various routines to draw drill holes, threaded holes, etc.
Mlayer.zip Move layer will move an entire layer as your selection set.
Note.zip This utility will add a predefined note that the user picks from a list along with a leader.
Numbering.lsp There are 7 routines in this one lisp file. It inserts ascending numbers or letters etc.. until you press [enter]. It remembers last inserted text and suggests the continuation. Descriptions and calling codes for each function are in the beginning of the file.
Pasteasblock.lsp A routine that allows you to choose a basepoint of a group of entities that you would like as a block, select the entities and select the insertion point that you want. NOTE: this lisp erases the original entities.
Pdistr13.lsp This program will enable the user to pick on a 2D polyline and have the cumulative distances displayed above each vertex of the polyline.
Power.rar A powerful set of lsp programs collected and combined into one organized program. Installation instructions are in the help files under "installation".
Protxlsp.zip

This program will take any file and encrypt it so that ONLY AutoLISP can read
the contents. The encryption is based on a user supplied encryption key. This
can be any single ASCII character.

Ps_v15.zip

This program file allows the user to drop in a pitch triangle representing base and rise of a sloping line segment, i.e. 12:7 pitch.

Pt.zip

Program to process of several polylines simultaneously. The user can select a group of entities, the program will filter out non-polylines. The user is then prompted to select one of the following properties to be manipulated; Width - change all selected plines to the specified width, Elev - change all selected plines to the specified elev, Layer - change all selected plines to the specified layer, Area - calculate the total area of the selected plines, Color - change all selected plines to the specified color (use -1 for BYLAYER), 2d - convert 3D plines to 2D plines (all 2D & 3D plines are set to 0 elev), 3d - convert 2D plines to 3D plines (existing 3D plines are unaffected), ? - displays this help screen

Rafter.zip This file contains two parametric programs that create a rafter and a roof truss (double rafter).
Rocklsp2.zip Yet another grab bag of lisp utilities. Tonnes of good stuff, and yes again...too many to mention. Just download it and check them out,
Roofpitch.rar A helpful tool for drawing roof pitches. Simply enter the rise, the run and the span and the program does the rest.
Rot2ent.lsp Rotates selected objects relative to a specific angle or to match the angle of an existing object.
Sl.lsp This program will reset the current layer to the layer of a user picked entity.
Slot1.zip Draws a long slot with rounded ends by specifying center point, width, overall length, and angle of slot.
Slot.zip Slot cuts a user defined slot in a circle.
Smver7.zip

This package was put together primarily as an aid to the sheet metal turret programmer although it has been found very useful by inspectors, quoters and designers of sheet metal parts and tooling. It is assumed that the reader is familiar with sheet metal layout theory.The forming calculations in this software are based on Lockheed formulas. Shop practice varies but these formulas are the most widely used. For those of you who use a set back (or K-factor) chart there is a routine on the main menu to adjust for this.

Sper.lsp Draws perpendicular lines to a spline.
Spst.rar Automatically draws a spiral staircase based on minimum user input.
Ssp_v25.zip

Use this tool to draw bent steel stair pans.  There are options to fill pans with concrete and for detailing purposes there is an option for auto-dimensioning.

Stair.rar Will draw stair stringers and dimension them with a special fraction font standard to steel industry.
Staircal.zip Stair riser and run calculations.
Steel2.zip This program will draw all of the structural steel shapes listed in the American Institute of Steel Construction's (AISC) Steel Construction Manual, either the ASD Ninth edition or the LRFD first edition. Dimensional data for the various steel shapes are stored in ".dim" files. The program needs to be able to find these files--either by locating them in the path via the findfile function, or in the special path specification "c:/acad/steel".
Steelshapes.rar Similar to Steel.rar below.
Steel.rar This is a great routine for anyone that works with structural steel or with architecture where you want each and every structural entity to scale. Comes with an easy to use dialog box. Just type in "SS" and that begins the command (Once it's loaded into autocad of course!).
Stl.lsp Similar to Steel.rar above.
Strsteel.rar Structural steel program to draw structural steel shapes.
symbols.zip

Contains 4 lisp routines including: Box1.lsp - Pick an insertion point and then your cursor will drag from the center of the box asking for a point. You can enter as any points as you wish and a line will be drawn from point to point. After you have picked your last point, enter a return. If you wish, you can also insert the box and strike enter for no extension line. Delta1.lsp - This is the same as Box1.lsp except that it inserts a delta (triangle). Note.lsp - This is the same as Box1.lsp except that it inserts a circle.

Tb.lsp

This routine writes a text string to the drawing and then breaks any lines, polylines, etc. that intersect an imaginary box around the text. The text is placed on the current layer using the current style. The default input and repeat capabilities of TB.LSP make multiple labeling very convenient.

Tba.zip This program will display a dialog box that will prompt the user for all the values required to complete an A4 title block and insert it into the drawing.
Templt.zip

A block cataloging and retrieval system that works within AutoCAD. It works similar to the WBLOCK command, but places all wblocks into an icon menu automatically. The wblock (symbol) can then be picked visually from the icon menu and inserted into any drawing, using multiple options for insertion scale, angle, etc.

Textsize.zip The purpose of this routine is to allow the user to easily calculate text heights based upon a given scale.
Tgraph.zip

This utility draws graphs of trigonometric functions that can be expressed in the form: "y = <function> of x". The routine permits virtually unlimited graph range by calculating and writing graph points to a file on disk, then reading the file to produce the graph. The disk file is named "gfpts.txt."; edit TGRAPH.LSP and change this name if it conflicts with a file name of your own.

Tip667.zip A simple lisp for date stamping.
Tools.zip A single lisp file that contains numerous tools for drafting that include dimensioning tools, properties tools, text tools and others.
Traver.zip

An AutoLISP program for surveyors and civil engineers for traverse note reduction.

Trims.zip

The first command, SCB, will erase and trim all entities outside of the rectangle and leave a polyline border. The second command, SC, will erase and trim all entities outside of the rectangle but will not leave a border. The final command, SCD, will erase and trim all entities inside of the rectangle and will not leave a border.

Trimtopoint.lsp This lisp program creates a construction line based on your input and trim the entities that you select to that construction line. To finish this command the construction line is erased.
Truss.rar Draws trusses based on user input.
Truss.zip This file contains a parametric program that creates elevation drawings of floor trusses. All variables are local except those used to carry defaults, as follows:
th = default truss height, cw = default component width, ch = default component height, ws = default web spacing.
Truss2.zip This autolisp program creates kingpost, howe, pratt, fink, belgian, or triangle fan trusses.
Ttt.zip Allows the user to draw a circle that is tangent to three points.
Updblock.zip

This file contains 2 block updating lisps; Updblkly.lsp - This routine allows the user to update the layer of all entities within a block to a single layer (exam: layer=0) without the user having to explode the symbol. By default the color of all entities are changed to BYLAYER. The routine changes the original definition of the block within the current drawing.Updblkcl.lsp - This routine allows the user to update the color of all entities within a block to a single color (exam: color=BYLAYER) without the user having to explode the symbol. By default the layer name of all entities are NOT changed. The routine changes the original definition of the block within the current drawing.

Vpgrid.lsp Places a grid in a Viewport with co-ordinates.
Vptext.lsp VPTEXT - This command scales all text in a drawing by a factor equal to the viewport scale, which is entered by the user.
WallDemo.zip Draws wall sections based on user input.
Walls.zip Draws walls in plan view based on user input.
Wallsect.rar Constructs wall sections based on user input.
Wblkall.zip This program WBLOCKs all block definitions in a drawing. Features include: 1. Writes the block to the current directory. 2. Prompts user for new name if the block name is more than 8 characters long. 3. If a .DWG file with the same name already exists, WBLKALL will ask permission first before overwriting.
Win12.rar This routine draws windows with multiple mullions in plan view between any two lines at any angle, without the use of a block. It works best if the lines are parallel, but is not required. The routine will place the mullions and glass on the current layer, and it will place the wall jambs on the same layer as the walls.
Windows.zip Routine for drawing elevation views of windows of the Andersen double-hung window. Allows user to select number of panes.
Zone.lsp This command will give a total area or length for all polylines on a specified layer.
Zp.lsp Lisp routine that sets all lines to an elevation of 0 if your drawing somehow ends up with lines ending elsewhere.