Return to home page

Last Edited 9/25/2011

AREP.LSP This is a routine that I have to edit everytime they change how ATTEDIT works. So, anyway this one will work in A2K and R14. I'm pretty sure it works in R12. It will not work in R13. I have one for R13, so if you email me for it, I'll pass it on. This one was mentioned in CADENCE Magazine by Peter Sheerin Volume 15, Number 4, April 2000, pg. 72 column 3. In Peter Sheerin's words, AREP.LSP blindly replaces the value of selected attributes withthe supplied text without performing a search and replace. So, start the routine, type in the text value you want, and start picking attributes one at a time until you have the value in all the attributes you want to have the value. Sorry. No window selection on this one. Thanks, Peter for your mention of me and my routine. I'll post the code here, so your readers can find it.


B2WB.LSP V.1.1 is a routine that writes a block to the folder described by the DWGPREFIX variable. Pick on the block, the routine writes it the the folder, and then use BLKEDIT.LSP to edit.

 BF0.LSP BF0.LSP  (0=zero) is a routine that when you pick a block it first gets the insertion point of the block, then it explodes the block, which turns all of its objects within to individual objects without and are then the "previous" selection set.   Then BF0 puts the entire "previous" selection set on the "0" (zero) layer.  Then, finally, it redefines the block using the same selection set and the original insertion point.  Voila!  The block is fixed.  BF0 stands for BlockFix - layer "0".   

BLKEDIT.LSP V2.0 was inspired by XREFED.LSP and was written for all ACAD users.  This one does a similar action as the other, except that it redefines your block after editing.  This is not an ATTREDEF routine.  So, that one (ATTREDEF.LSP) will still have to be run afterwards if your block has attributes. Requires that the file be in the ACAD file search path and that the path and file have no spaces within their names. It's the next best thing to REFEDIT which is a block editing routine in AutoCAD 2000 that edits and redefines all instances of the block right in the drawing editor.

ATTREDEF.LSP is a routine that is supplied with AutoCAD.

 DDESET.LSP This routine is actually similar to DDEMODES, which used to be what we had to set our linetype and color drawing properties.  But with this routines, we can just pick an object and our properties are set the same as the

FIX.LSP V2.0 was written for all ACAD users. Patterned after a collegue's (Jim Center)routine, completely re-written in my basic programming logic (more lines of code per function - not an admirable way of doing things, but easy to understand and equally effective.) This version will work with MTEXT objects as well as TEXT objects.

 FXBLOCK.LSP V2.0 was written for all ACAD users.  When you want only to redefine a block from a drawing file that exists in the ACAD Envinronment, This will do it in either of two ways. Pick the block or hit the ENTER key to type in the block's name. Requires that the file be in the ACAD file search path and that the path and file have no spaces within their names.

  GAEDIT.LSP This is a ANOTHER routine that I have to edit every time they change how ATTEDIT works. So, anyway this one will work in A2K and R14. I'm pretty sure it works in R12. It will not work in R13. I have one for R13, so if you email me for it, I'll pass it on. This one was mentioned in CADENCE Magazine by Peter Sheerin Volume 15, Number 4, April 2000, pg. 72 column 3. In Peter Sheerin's words, GAEDIT.LSP performs a search and replace for text in attributes. It first asks for the string to change either the whole attribute value or a portion of it and then the text with which to replace it. Individual attributes are then selected on at a time until the <Enter> key is pressed (or a right mouse click if your configuration allows it). No further explanation necessary. Thanks, Peter for mentioning my routine and me. I'm putting the code here on my site, because I couldn't find it in the magazine. Sorry. Just like AREP.LSP, there is no window selection on this one.

 Down load GT.lsp Text changing utility.

V. 2.1 Now changes the new ARCALIGNEDTEXT objects. When I first tried this I discovered a bug in the object type. Those who have EXPRESS TOOLS can get this type and also get the ARCTEXT command. It might be here now on AutoCAD 2000. If it is, I hope the bug is fixed. When you create the text, It won't edit with DDEDIT, but it will edit with the same command with which the object was made. But not width factors, global editing of text content and width factors, and Distance from center, starting angle, ending angle, case, and text style. Text Height still has to be edited from the ARCTEXT command - for now. I'll change it with the next update (V2.01). The Undo command now works properly after this routine has been run.

 Down load HATCHSET.LSP Set Hatching parameters by picking a hatch.

V. 1.5 Allows you to set hatch parameters in one pick. This comes in handy before running MHATCH.LSP or for running a -bhatch or (command "bhatch").

Down load IO.LSP Isometric Offset Utility. - Better than CADONLINE's IO.LSP

V. 2.0 Corrects problems associated with Fractional and Architectural Units settings. Works in R12, R13, R14, A2Kand A2K2. Indispensable when working with Isometric illustrations drawing. Watch what happens when you offset an isometric ellipse. Great for making isometric rounds as well as isometric rectangular objects

 Down load ISODIM.LSP Isometric Dimensioning Utility.

V. 2.0 Corrects problems associated with Fractional and Architectural Units settings. Works in R12, R13, R14, A2K, A2Ki, and A2K2. Indispensable when working with Isometric illustrations drawing. Sorry. No skewed arrows or text included. At least not yet. Hey, what the heck! It's FREE, after all! You want better, I'll make it, but it will cost you. Otherwise, enjoy this one out of the goodness of my heart. Any problems other than arrows and text styles, write to me. I want to make good quality routines.

Down load LASF.LSP Layer Isolation Utility

V.3.0This works differently than the LAYISO routine supplied as an EXPRESS tool by Autodesk for AutoCAD. This routine isolates the layers by freezing all the rest. Selecting "ALL" after using this routine, will not cause selection of objects that reside on the layers that are frozen and not displayed, contrary to LAYISO. Error Checking has been added to this routine. If your REGENMODE gets changed if you cancel in the middle of the routine, let me know with an email message. It should now not change even if you cancel. This feature has been improved with Version 2.1  In Version 3.0, I added an UNLASF function.  It works well, except for XREF layers.  I need to figure out a way to reset those layers back to their original states. 


MODATT.LSP This is a routine that I have had to edit every time they change how ATTEDIT works. So, anyway this one will work in A2K and R14. I'm pretty sure it works in R12. It will not work in R13. I am no longer supporting R13.  I like R13, but I'm pretty much alone in that opinion. Anyway, start the routine, pick an attribute, the routine will assist you first in rotating the attribute to the desired orientation, then will ask you to move the attribute to the position you want to put it in.  The original MODATT, was very simple in code and worked quite well in A2K and previous releases.  But in A2K4 and above, it started acting screwy.  You would pick a position and it would end up being somwhere else, or you had to ignore where it was looking like it was going and just pick the point.  It was not fun anymore.  So, with this version, (now enough of my own code to be able to post it here), It creates a text version of the attribute and allows you to rotate it and text it and then the attributes gets placed where you placed the text and then the text gets deleted - even if you decide to hit ESC before finishing.  The routine has an error handler, so if anybody has any problems with this routine and how it handled cancelling out of the routine before finishing, please let me know, so I can work on it further.  In my opinion a program is never finished until everyone like it.  So, that means almost all of my routines are unfinished - kinda like Microsoft Windows. 

Down load MHATCH.LSP Multiple Hatching Utility.

V. 1.1 allows you to create multiple hatches that are separate. You will need to have run BHATCH one time to get the pattern chosen or you can run HATCHSET.LSP to set the parameters. But after that, you can run MHATCH and choose between point picks or object picks. Tested in AutoCAD 2000 & above. It will not work in R13 or below because it uses the DRAWORDER command.   V1.1 fixes a problem with SSADD not working completely when using the object selction method for hatching. 



Create a line on the layer of your choice that will be the model line for all the lines you want to represent the rebars within the slab. The routine will ask you to select the one and only rebar line that you drew in the slab boundary, then it will ask you to select the boundaries that are to each side of the line so it can then create an array of those lines to fit within the boundaries.  You will then be asked to select a direction for the array.  If the boundary width is a multiple of the distance between one side of the boundary and the other, you will need to erase the last object in the array.  Otherwise you will be asked to move the new array of lines to one side or the other just a little bit in order to center them within the boundary.  I made the routine to work within rotated UCSs.  


TF.LSP (text find) V1.7

This routine searches for whatever you type. Now searches 1-character text as well as multi-character text.  It  draws lines from the middle of your screen to the insertion point of each text string it finds. Now works for 1-character strings as well as multiple character strings. Searches both TEXT and MTEXT objects.  No longer any problem with UCSs other than the WORLD  The ony drawback to this is sometimes you get two lines to a piece of text.  So, knowing that, you can just remember to erase them with a fence or crossing window.  I like it.  It looks for both lower and upper case versions of the sought text. 


Down load UNMI.LSP Block horizontal unmirroring utility using a vertical mirror line.

V2.3 now includes attribute-containing blocks. So, now, using a programmed vertical mirror line, you can unmirror all horizontally mirrored blocks of any name by picking only one of them. The block you pick doesn't have to be mirrored, either. If you want, you can enter the block name at the keyboard.  Recent edits to the error checker will help isolate error checker problems if they surface.  If you want to vertically mirror blocks on a programmed horizontal mirror line, an easy edit can be made to the routine to accomplish that.  Changing the 12<90 to 12<0 does the trick.  If you make that edit, let me know.  I need to know just how often that need arises.  If it happens often enough, Iíll put in a choice of direction in the routine.

VALATT.LSP V2.0 Matches attribute values and text values to selected attributes or texts or mtexts. Will also match dimensions to MTEXT content, and text nested in blocks to text or attributes or even cells in TABLES (2006 and above).   Recent discoveries reveal that itís wise to know where the insertion point of an attribute is so that you can pick close to the insertion point what asked to select by this routine.  With ACAD versions 2006 and above, the system variable SELECTIONPREVIEW can be set so that the attribute will pre-highlight before actually clicking on it.

Very handy to say the least.


WBLD.LSP  Makes it easy to write a block to the working folder.  No more browsing.


XLS.LSP  V1.0  Click on a layer nested in an XREF (not a block).  Doing so, will enable you to set to that layer in the base drawing.  If the layer doesnít exist in the base drawing, the routine will ask you if you want to create the layer.  If you do, ent er Y at the command line, and the layer will be created with the correct color and linetype.  You can add other layer properties later in the Layer Properties Manager.


XLAYISO.LSP  V1.0  Use this to isolate more than one layer in an XREF.  The rest of the layers arenít turned off.  They are frozen. 


XREFED.LSP V2.5 Originally for those who didn't have EXPRESS tools' XREFEDIT.  Also, sometimes youíd rather quickly open a drawing than use refedit to edit it in the drawing editor.  Now you can open and edit XREF drawings and reload them in one shot.  You may need to change an option, and if you need to, a message comes up when you start the routine that tells you how to do that.  But you will need to check with your CAD manager to see if he will allow the change (network ACAD users).  If you make the change, you will probably have to start a new drawing in order for it to take effect. After loading, type XREFED to start; pick the XREF object and a new session of AutoCAD will start. It works well in ACAD2000 - 2006.  It still requires that the file be in the ACAD file search path, and it used to require that the path or file has no spaces within their names.  That may be different nowadays.  It's worth a try.  There is some of my propietary stuff in this routine, but it will ignore them for your use. 


Down load Z0.LSP Flattening Utility.

V. 2.08  Wipeouts have been added with this version.  In prior version, XLINES and RAYS were added.  Flattens all lines, by changing the Z axis coordinate of each ENDPoint, moves the insertion points of blocks and dimensions and tolerances to Z-zero. It also moves by changing elevation of polylines and lwpolylines (not each vertex), arcs, circles, ellipses, text, attribute definitions, hatches, splines, and solids (2-D). If you want more, let me know. I'll add it if I can. If you have EXPRESS TOOLS, there is a better routine in there called FLATTEN, however, on rare occasion, Flatten would give me trouble, so I would run this routine in addition to flatten, and problems were solved.  There is a report at the end of my routine that attempts to tell you how many objects were moved.  It isn't always accurate, and I havenít bothered to find out why, but it is accurate most of the time.  That is to say it's ALMOST accurate.  Oh, well.


AutoCAD & AutoLISP are registered trademarks of AUTODESK, INC.

ATTREDEF.LSP is a routine that is supplied with AutoCAD.



AutoLISP Routines For Sale

Return to home page



E-mail me with any comments, questions or suggestions.



counter stats
counter stats