Welcome to Lee Mac Programming

Expert Elite

Increase your AutoCAD Productivity

Make AutoCAD work for you by using custom programming to automate many repetitive tasks.

This site is primarily aimed towards utilising the AutoLISP & Visual LISP APIs to create custom programs which may be run within full versions of AutoCAD (not LT versions) and many of its derivative programs.

A Sample of my Work...

In addition to my custom programming services, I offer a plethora of free LISP programs available for you to download, covering a huge range of applications: from text manipulation to attribute extraction and everything inbetween.

The Tutorials page also offers an insight into how you can learn to create your own AutoLISP programs and quickly increase your AutoCAD efficiency and productivity.

Whether you are a complete beginner or perhaps more experienced, I have no doubt that you can benefit from the help & resources available here.

What is AutoLISP?

AutoLISP is a dialect of the LISP programming language engineered to enable manipulation & customisation of AutoCAD and many of its derivative programs such as Civil 3D, MEP, Architecture, Electrical etc. Other applications such as BricsCAD and IntelliCAD also offer the ability to run AutoLISP programs. Historically, AutoLISP was only supported by full versions of AutoCAD and could not be run on any version of AutoCAD LT; however, whilst AutoCAD LT 2024 introduced support for LISP, the LISP API in this release has several restrictions and consequently a number of my programs may not be compatible on this platform.

Visual LISP is an extension of AutoLISP introduced as an add-on to AutoCAD R14, and subsequently fully incorporated into the release of AutoCAD 2000. Visual LISP provides access to ActiveX/COM and offers many advanced functions to aid with customisation.

New to AutoLISP?

Not sure how to run a program? Be sure to see my tutorial on Running an AutoLISP Program.

Site News  

15th March 2024

I have tweaked my Layer Director application in release Version 2.1 to account for the insertion of multiple external references into an empty drawing file.

8th March 2024

I have updated my Layer Director application to Version 2.0. This update fixes a bug causing an error when attaching an external reference to a blank/empty drawing file.

31st December 2023

To conclude another year of this site, I have updated my Renumber Layouts program to Version 1.2. This new version incorporates a new prompt providing the option for the user to renumber a selected subset of Paperspace layouts rather than always renumbering all Paperspace layouts.

8th August 2023

Following an excellent suggestion received from a visitor to my site, I have now updated my Align Text to Curve application to Version 1.3. In addition to general bug fixes, this version incorporates the ability for the user to modify the background mask offset for MText objects.

2nd May 2023

After a significant amount of work undertaken sporadically over the last few months, I'm finally ready to release Version 1.5 of my Batch Attribute Editor. This new version introduces several new features whilst also fixing a number of bugs reported over the years since the release of the last version.

Noteworthy new features include the following:

  • The ability to increment attribute values by layout (in addition to by drawing).
  • The ability to control the order in which drawing files are processed.
  • The ability to reference existing attribute values in the new value, facilitating easy prefixing & suffixing operations.

5th September 2022

I have updated my Length & Area Field program to Version 1.4. This new version implements a much-requested feature with the ability for the user to subtract lengths & areas from the total via an optional subtraction prompt. The issue of such prompt is controlled by an optional parameter supplied to each the main functions, allowing the program to be configured to operate in the same manner as the previous version, if desired.

29th August 2022

I have updated my Add Polyline Vertex program to Version 1.1. This version resolves a bug where the addition of a vertex to the final arc segment of a polyline would cause the segment to become linear. The new version also implements an appropriate undo group for the modification operation.

17th May 2022

Following invaluable feedback from a visitor to my site, I have revised the code for my Wildcard Remove Support File Search Paths function to correct a bug which would have resulted in the function performing no modification to the set of defined Support File Search Paths.

15th March 2022

I have updated my Text to Words application to Version 1.1. This new version resolves an error arising from the selection of source text containing one or more extension dictionaries, with the new version now omitting all such dictionaries from the DXF data when generating new text objects.

29th November 2021

I have updated my Strikethrough Text application to Version 1.2. This new version incorporates compatibility for both single & multiline attributes (with a single line of text), and defines two supporting functions to facilitate the evaluation of the main function with a single object selection or selection of multiple objects, vastly simplifying the set of custom strikethrough commands and thereby making it easier for a non-technical user to define their own custom strikethrough commands by following the same format without requiring any prior programming knowledge.

6th October 2021

For those who visit my site on a regular basis, I realise that this is only the second update to the site for the entirety of this year, but after this brief & temporary hiatus, I now hope to resume more frequent updates and additions to my site over the coming weeks & months, so stay tuned.

Based on valuable feedback received from several members over at the CADTutor forum, I have now updated my 3-Point Rectangle application to Version 1.2. The updated code incorporates appropriate undo marks and also ensures that the 2D polyline created by the program is positioned at the correct elevation relative to the active UCS.

19th January 2021

I have updated the two Increment Alpha functions as part of my set of Column Reference Functions in order to correct a bug causing the functions to increment from Y to @.

22nd December 2020

Following an excellent suggestion from a user, I have further revised my Align Objects to Curve application to Version 1.7. This revision ensures that the preview of the set of objects being aligned is removed if the user exits the alignment prompt using Enter, Space, right-click, or the Exit keyword option.

15th December 2020

Following valuable feedback received from a visitor to my site, I have updated my Align Objects to Curve application to Version 1.6. This version resolves a bug causing a divide by zero error when specifying the offset for an object with zero height (such as a horizontal line).

15th November 2020

My Add Objects to Block program has been updated to Version 1.2. For this new version, the program has been completely rewritten and includes additional checks for items such as non-uniformly scaled blocks, dynamic blocks, and for references of the target block definition within the selection of objects to be added to such definition (thereby preventing a block reference being added to its own definition, causing a circular reference) - all of these changes result in a far more stable program.

14th November 2020

I have updated my Automatic Block Break application to Version 1.9. This update revises the calculation of the block rotation angle in order to account for block insertion points which lie exactly on the end points of the supplied curve - a scenario which caused the previous version of the application to return an error under some circumstances.

31st October 2020  

Following an excellent suggestion received from a visitor to my site, I have updated my 3-Point Rectangle program to Version 1.1. This new version enhances the dynamic command to allow the user to specify a side length when prompted for the third point, with the program automatically calculating the appropriate vertex coordinates using the position of the cursor relative to the first two points specified.

5th September 2020

I have updated my Renumber Layouts program to Version 1.1. This version incorporates the ability to specify a starting number, whilst retaining the option to predefine the starting number (e.g. at 1) for those users who do not require the additional prompt.

19th May 2020

I have now updated my Extract Nested Block application to Version 1.2. This update fixes a bug that was causing the program to crash during the process of obtaining all references of the parent block for a selected nested block, with the program crashing upon encountering a block reference with an (102 . "{ACAD_REACTORS") entry pointing to an associative dimension (DIMASSOC entity).

12th May 2020

There is now a new addition to my set of functions for manipulating Support File Search Paths within AutoCAD: Wildcard Remove Support File Search Paths will remove all AutoCAD Support File Search Paths matching a supplied case-insensitive wildcard pattern.

8th March 2020

I have updated my Copy or Swap Text application to Version 1.8. This update provides support for copying & swapping the text content held by table cells.

15th February 2020

I have updated my Automatically Label Attributes application to Version 1.4. This implements changes to the code to account for the existence of attributed MInsert blocks which would cause the previous version of the application to report an error.

26th January 2020

New Program! Renumber Layouts enables the user to automatically sequentially renumber all Paperspace layouts, with an optional prefix and/or suffix.

12th January 2020  

I have updated my Entity to Point List function to Version 1.2. The revised code now returns a consistent point list when supplied with linear 2D polylines at different elevations, and also prevents the possibility of returning exponentially large point lists with significant processing overhead when handling certain types of splines.

Finally, as this is the first site update of new year, I shall take this opportunity to wish all visitors to my site a very Happy New Year and all the best for a healthy & prosperous 2020!

24th November 2019

My Chain Selection program has now been updated to Version 1.1. This revision excludes objects residing on off, locked, or frozen layers from the resulting selection.

8th September 2019

I have updated my Justify Block Base Point program to Version 1.1. This update accounts for nested blocks within nested xrefs.

My Align Objects to Curve program has now been updated to Version 1.5. This update incorporates the option to enable to disable Multiple Mode; when enabled, this mode allows the user to continuously align multiple copies of the selected objects to the selected curve.

12th August 2019

I have updated my Viewport Outline to Version 1.3. This version restructures the program as a core function accepting a viewport entity argument, facilitating the creation of two additional custom commands: VPOL to outline all viewports in the active Paperspace layout, and VPOA to outline all viewports in all Paperspace layouts.

23rd July 2019

I have further updated my Load Linetypes function to Version 1.3. This version implements further minor efficiency refinements and also enables compatibility with newer releases of AutoCAD and its derivatives through the use of the command-s function.

15th May 2019

I have updated my Load Linetypes function to Version 1.2. This minor refinement to the code improves the efficiency of the function when supplied with linetypes which are already defined in the active drawing and when the redefine argument is nil.

27th April 2019

On receiving invaluable feedback from a user of my DCL List Tile Dependency function reporting a circumstance in which the function would raise an error, coupled with an excellent suggestion from the great Gilles Chanteau, I have now revised the code for the function to resolve the reported issue.

29th December 2018

Following an excellent suggestion from a member of the CADTutor AutoLISP forum, I have updated my Dump Object utility to Version 1.2. The code for this new version has been entirely rewritten to offer a more elegant solution for supplied arguments of varying data types, and the function will now also accept an entity handle argument.

23rd December 2018

I have updated my Layer Director application to Version 1.9. This version introduces a new layerdirector:lspcommand parameter which determines whether layer changes can be triggered by AutoCAD commands invoked by AutoLISP programs. By default, the parameter is disabled, meaning that only the AutoLISP command itself will trigger a layer change; but if this parameter is enabled, any AutoCAD commands invoked as part of the evaluation of the AutoLISP program may also trigger layer changes.

22nd December 2018

Following valuable user feedback, my Burst Upgraded application has been further revised to Version 1.7. This version accounts for the possibility of encountering nested external references (xrefs) when using the Nested Burst (nburst) command, excluding such objects from the burst operation.

10th December 2018

I have updated my Burst Upgraded application to Version 1.6. This version now offers two custom commands pburst (Primary Burst) and nburst (Nested Burst), incorporating the functionality of my Nested Burst application and consolidating the two very similar programs into a single program, facilitating easier maintainance going forward. The program has also been modified to account for invisible objects created when exploding dynamic block references with visibility states, and fixes a bug causing attributes with transparency to be removed by the burst operation.

10th November 2018

Following valuable user feedback, I have updated my Background Mask application to Version 1.5. This new version implements code to account for a bug present in AutoCAD whereby the multileader text spacing factor is reset to 1.0 following modification of the background mask properties.

4th November 2018

I have updated my Length & Area Field application to Version 1.3. This new version converts the two core commands c:lf (Length Field) and c:af (Area Field) into the functions lengthfield and areafield respectively. These functions may each be evaluated with two parameters: an optional target attribute tag and an optional field formatting code, thus enabling the user to define endless custom commands in a manner similar to that of my Quick Field utility. I have provided a full explanation of how to define additional custom commands on the program page, and have also included a table of contents for ease of navigation.

29th October 2018

My Length Field application has been renamed to Length & Area Field and now offers two commands: LF (Length Field) and AF (Area Field). The program has also been restructured in an effort to standardise the output functionality across all of my related field programs.

I have updated my Field Arithmetic program to Version 1.2. This new version generates the resulting field using my standard LM:outputtext function, facilitating output of the resulting field to existing table cells, text, mtext, multileaders, attributes, in addition to generating a new mtext object.

28th October 2018

I have updated my Nested Burst application to Version 1.2. This revised version implements fixes to retain constant attribute values (converting the exploded definitions to single-line or multiline text appropriately), account for mirrored block references (for which one of the scale factors is negated), and finally account for multiline attribute references whose text content occupies multiple group 1 & 3 DXF groups. Essentially, the code is now consistent with the latest version my Burst Upgraded application. I have also included an animated GIF to demonstrate the program in action.

27th October 2018

My Auto Label Attributes application has now been updated to Version 1.3 in order to fix a bug present in the autolabel:getattributetagid function which was preventing the numbering of some multileaders with attributed block content.

17th October 2018

New Program! Multiline Justification enables the user to change the justification of a selection of multilines, without changing their position. Analogous to the Express Tools' TJUST command, however targeting mlines instead of text.

30th August 2018

I have updated my Drawing Version function to include the 2018 drawing file format. I have also restructured the program page to include a link to download the code for the function directly.

27th August 2018

I have revised my tutorial entitled Prompting with a Default Option to simplify the examples (removing a number of unnecessary & unhelpful variations), revise some of the explanations, and include additional examples demonstrating how to handle other data-types. I have also added a Table of Contents for ease of navigation.

9th July 2018

My Upgraded Burst program has now been revised to Version 1.5 to address a bug arising when bursting constant or variable multiline attributes whose attribute value occupies multiple sets of group 1 & 3 DXF groups (i.e. attribute values longer than 250 characters) causing the content of the resulting multiline text object to be truncated.

6th May 2018

I have updated my Object Align application to Version 1.4. In this new version, the majority of the code has been completely overhauled to align it with the techniques & standard of code implemented when developing my similar Align Text to Curve application; the program has also been revised to facilitate compatibility with all UCS & View settings.

11th March 2018

I have updated my Polyline Taper program to Version 1.1. This enhanced version offers a new Multiple option at the polyline selection prompt, allowing the user to apply a taper to all polylines in a selection simultaneously.

10th March 2018

Following user feedback, I have updated the code for Example 4 program found on the page for my ObjectDBX Wrapper function. The new code accounts for earlier versions of AutoCAD in which the effectivename property of a block reference object is not available. This fourth example program demonstrates how my ObjectDBX Wrapper function may be used to easily extract & generate a file containing attribute data found in all attributed blocks within in an entire set of drawings in a selected directory.

8th March 2018

I have updated my Entity to Point List function to Version 1.1. The new code addresses a number of issues involving duplicate points being returned when generating point lists for polylines containing multiple arc segments or polylines which are visually closed but whose Closed property is False. The new version also introduces an additional parameter to control the point density when approximating non-linear objects.

15th January 2018

I have updated my Match Field Formatting application to Version 1.2. This new version fixes a bug in which any text content following the last field expression held by the target annotation object would be lost following the application of the source field formatting.

6th January 2018  

Following user feedback, I have updated my Burst Upgraded application to Version 1.4. This update ensures that single-line & multiline constant visible attributes are retained and converted to single-line or multiline text respectively when the block is exploded - such attributes would be lost when using the previous version of the program.

Finally, as this is the first site update of new year, I shall take this opportunity to wish all visitors to my site a very Happy New Year and all the best for a healthy & prosperous 2018!

30th December 2017

I have updated my set of 3-Point Circle & Arc Functions, rewriting the 3-Point Circle function to improve the concision of the code, rewriting the corresponding example programs for both the 3-Point Circle & Arc to enable compatibility with all AutoCAD UCS and View settings, rewriting the 3-Point Arc example program to instead use the 3-Point Circle function (and therefore removing the superfluous 3-Point Arc function), and finally, rewriting the 3-Point Polyline Arc program to use the new 3-Points to Bulge function included as part of my Bulge Conversion Functions.

I have updated my set of Bulge Conversion Functions to include a new 3-Points to Bulge function which will calculate the appropriate bulge value for an arc passing through three supplied points.

9th October 2017

I have updated my Automatic Block Break application to Version 1.8. This revised version refines the calculation of the block definition bounding box to ignore block components residing on frozen layers and account for the possibility of null bounding boxes (as a result of all components being excluded from the calculation). This version also updates the ABB command to incorporate the ability for the user to specify a block name directly at the command-line when inserting a new block.

14th September 2017

Following feedback from a couple of visitors to my site, I have now updated my set of Attribute Functions to improve the consistency between the two sets of functions in the library, and to provide Vanilla AutoLISP support for multiline attributes. The Vanilla AutoLISP functions will now return nil when passed a non-attributed block, consistent with the Visual LISP variants. I have also renamed the LM:getattributes function to LM:getattributevalues, as this function is the converse to the existing LM:setattributevalues function. For extra convenience, all functions in the library may now be downloaded as a single file using the download link at the top of the page.

3rd September 2017

After receiving a couple of suggestions from an avid user of my Viewport Outline program, I have now updated the program to Version 1.2. This new version offers the ability to offset the viewport outline by a predetermined number of paperspace units inside the viewport boundary, and also allows the user to automatically apply a set of predefined properties to the resulting modelspace polyline. I have also included a new animated demonstration of the program on the program page in order to convey the program's capabilities.

28th August 2017

I have updated my set of Rounding Functions to include several additional functions, and have also standardised the page format for consistency with the rest of the site.

6th August 2017

New Program! Length Field allows a user to generate a field expression referencing the length/perimeter/circumference of one or more selected objects. In the case of selecting multiple objects, the field expression references the sum of the lengths of all objects in the selection. The resulting field can then be displayed as a new MText object, or housed within an existing table cell, single-line text, multiline text, multileader, or attribute.

22nd July 2017

I have updated my set of List Box Functions, rewriting a number of the functions, and providing an improved test program. The program will now enable or disable the ordering controls depending on whether the ordering operation is valid for the selected items (e.g. if the top item is selected, the 'Top' button will be automatically disabled). The test program now also accounts for a deselection of all items in the list (disabling all ordering controls), a situation that would cause the previous version to crash.

13th June 2017

Following valuable user feedback, I have enhanced my Field Code function to account for field expressions which are greater than 250 characters in length. Following this modification, I have consequently updated my Copy Field, Field Formatting Code, Match Field Formatting, and Field Arithmetic programs, which all rely heavily on receiving the correct output from this function.

14th May 2017

New Program! Field Arithmetic allows the user to perform arithmetic operations on selected text or field expressions, with the result of the calculation represented using a field expression. The program is compatible with DText, MText, Attributes, MLeaders & Dimensions and will also reference nested field expressions held by these objects.

25th April 2017

I have updated my Dimension Overlap program to Version 1.2. This update incorporates a couple of user-configurable program parameters which allow the user to easily adjust the tolerance used for dimension comparison, and the properties of the layer assigned to overlapping dimensions.

17th April 2017

I have updated my Background Mask application to Version 1.4. The new version fixes a bug which was causing the program to crash when modifying the background mask properties for dimensions with one or more dimension style overrides already applied.

12th April 2017

Following user feedback, I have updated my Copy or Swap Text application to Version 1.7. This update resolves a bug causing the program to produce an incorrect output when processing MText objects whose text content occupied multiple DXF group 3 entries.

8th April 2017

Following additional user feedback received from avid users of my Layer Director utility, I have implemented further improvements to the code and have updated this application to Version 1.8. The new version now accounts for the use of the 3DORBIT command when invoked transparently from within a command which has been configured to trigger a layer change. Previously, the act of invoking the 3DORBIT command transparently would cause the layer to be reset to the previously active layer, resulting in the new object incorrectly being created on this layer.

2nd April 2017

Following valuable user feedback, I have updated my Layer Director application to Version 1.7. The updated code now accounts for the simultaneous insertion of multiple xrefs when using the XATTACH or CLASSICXREF commands, as part of the xref-dependent layering option.

18th March 2017

As an analog to my existing Area Field to Attribute application, I have added a new Length Field to Attribute program which enables the user to populate a selected attribute with a field expression referencing the length or perimeter (or sum of lengths or perimeters) of one or more selected objects.

15th January 2017

Following valuable user feedback, I have updated my Layer Prefix/Suffix application which allows a user to apply a prefix or suffix to the layer names of all layers found in a selection. The updated code fixes a bug wherein the prefix and/or suffix was being applied & removed a number of times equal to the number of objects in the selection. The updated code also removes the restriction present in the previous version which prevented layers whose layer name started or ended with the same character as the prefix or suffix from being selected for processing. Finally, the new version provides more verbose output to indicate to the user exactly which layers have been renamed by the program.

4th January 2017  

I have updated my Selection Set Bounding Box function page to include an alternative version of the function which avoids the limitation on the number of objects which may be processed as a result of the maximum number of arguments accepted by the AutoLISP min & max functions.

I have also included a brand new test program, and a GIF animation to demonstrate how the function may be used.

Finally, as this is the first site update of the new year, I shall take this opportunity to wish all visitors to my site a Happy New Year and all the best for a healthy & prosperous 2017!

29th December 2016

New Program! Layout Field defines a set of commands which enable the user to populate a selected annotation object (Text, MText, Attribute) with a field expression referencing the name and position of the layout in which the object resides. However - and most importantly - the field expressions generated by the program do not reference the CTAB system variable, and will therefore yield the correct result independent of whether or not the layout is current.

27th November 2016

I have updated my Remove Support File Search Paths function as part of my set of Add & Remove Support File Search Paths functions to allow users to remove paths containing forward-slash path delimiters and with trailing path delimiters. The code has also been condensed for efficiency & readability.

8th November 2016

New Program! Layer Prefix/Suffix allows the user to apply or remove a prefix and/or suffix to all layers found in a selection of objects.

7th November 2016

I have updated my LM:intersections function as part of my set of Intersection Functions to validate the applicability of the ActiveX intersectwith method on the two supplied vla-objects prior to invoking this method. The function will therefore gracefully return nil if either of the supplied objects do not support this method.

5th November 2016

I have updated my Delete Blocks program to Version 1.1. This update alters the program operation to allow the user to select a block to be deleted from the drawing, with the option of selecting a block by name (using the dialog displayed by the previous version of the program) available upon the user typing N at the selection prompt. The dialog interface has also been enhanced to include an edit box, allowing the user to filter the displayed list of block names.

I have updated my List Box with Filter function to Version 1.1. This version fixes a bug arising when the user selects multiple items, applies a filter which excludes one or more of the selected items, and then accepts the resulting selection.

26th October 2016

Following valuable feedback from a user, I have updated my Incremental Array application to Version 1.8. This revision fixes a bug causing the program to crash if parentheses or double-quotes were found in the text content.

18th September 2016

My Update Titleblock Attributes program has been revised to Version 1.9. This version fixes the implementation of the block filter parameter when processing attributed dynamic blocks (Version 1.8 would ignore the block filter when processing such blocks).

11th August 2016

Following valuable feedback received from a member of the CADTutor forums, I have now updated my Viewport Outline program to Version 1.1. The updated code now accounts for polygonal viewports represented by 2D (Heavy) Polylines (this can arise when rotating a rectangular viewport, for example).

23rd June 2016

New Program: Limited Length Polyline allows the user to dynamically construct a straight-segmented polyline whose overall length may optionally be limited to a given value. The program uses my GrText and GrSnap functions to allow the polyline to be accurately constructed with the length displayed in real-time at the cursor.

20th June 2016

Following user feedback for the previous version, I now have updated my Selection Counter utility to Version 1.4. This new version ensures that the selection count for selected objects following grip-editing operations is retained, and corrects the reported selection count for non-rectangular viewports (which were previously counted as two objects).

6th June 2016

I have updated my Selection Counter utility to Version 1.3 to account for the use of the standard QSELECT and SELECTSIMILAR AutoCAD commands and display the number of selected objects accordingly.

30th May 2016

As promised below, I have now updated the page for my Background Mask application to include detailed instructions describing how to create your own custom background mask programs which bypass the main program dialog to apply predefined background mask properties to all objects in a selection.

23rd May 2016

I have again updated my Background Mask application to Version 1.3 to include a dedicated selection function to facilitate the creation of custom background mask programs which bypass the main program dialog. I will also soon update the program description to include instructions on how to create such programs.

22nd May 2016

I have updated my Background Mask application to Version 1.2. The new version has been entirely restructured and now provides dedicated functions to allow the user to bypass the main program dialog if desired. The program also now enables the user to manipulate the background mask for dimensions.

10th May 2016

I have tweaked my recently updated Layer Director application to account for the use of the legacy CLASSICXREF command.

9th May 2016

Following an excellent suggestion received from an avid user of my programs, I have updated my Layer Director utility to Version 1.5. This new version incorporates the option to enable an 'xref-dependent' layer assignment, causing external references to be automatically inserted on a layer whose name matches that of the inserted xref, with an optional prefix & suffix, and fully-configurable layer properties.

24th April 2016

My Segment Curve program has now been entirely rewritten and updated to Version 1.1. In rewriting the application, I have improved the error handling, program performance and code readability, paving the way for possible future enhancements.

10th April 2016

I have updated my Quick Field utility to invoke the AutoCAD UPDATEFIELD command when inserting a new field expression into the content of a selected attribute reference, as the use of such command or a drawing regeneration is required in order to display the value of new fields within attributes.

27th March 2016

Upon receiving a report by a reader of my site that my MD5 Cryptographic Hash Function was returning results which were inconsistent with other online MD5 hash generators for some input data, I ascertained that the results were indeed incorrect for input data longer than 56 bytes (i.e. 56 characters). I determined that the cause of this issue was due to the arithmetic operations that are performed on the 4 32-bit hash values after processing each 512-bit chunk of input data not being wrapped to a 32-bit unsigned integer (as required by the algorithm), and also that such operations could potentially be introducing rounding errors as a consequence of the use of doubles to store the 4 32-bit items of hash data. To resolve this issue, I designed a bitwise addition function so that all operations could be performed on a list of 32-bits, with no loss of precision. I have therefore updated my MD5 Cryptographic Hash Function to Version 1.1.

25th March 2016

I have updated my Selection Counter utility to Version 1.2. This update implements an additional fail-safe to ensure that the MODEMACRO system variable is correctly reset when objects are deselected.

21st March 2016

Since releasing the latest version of my Copy or Swap Text application yesterday, I am pleased to have received a wealth of positive feedback, and also several bug reports from avid users of the program. I have now fixed the reported bugs and have updated the program to Version 1.6. I wish to extend a huge thank you to all of my readers who were kind enough to test the program to its limit and report back with their feedback, in turn improving the application for others.

I have also updated my Copy to Drawings program to incorporate the latest version of my Get Files Dialog function (which also addresses a number of bugs), and to also refine the command-line output to report the number of successful & unsuccessful drawings processed by the program.

Finally, I have updated my Get Files Dialog function to Version 1.6 to fix a bug causing the 'Add Files' button to be incorrectly enabled when the user selected a directory.

20th March 2016

Following valuable and encouraging user feedback, I have now updated my Copy or Swap Text application to Version 1.5. The program has been mostly rewritten in order to incorporate compatibility for all types of Dimensions, and for Multileaders with Attributed Block content.

8th March 2016

As an academic diversion from my typical programming, I have explored the fascinating fractal nature of the Sierpinski Triangle, along with its 3D analog: the Sierpinski Tetrahedron. This brief study forms part of my selection of Mathematical Endeavours.

I have also updated my code to generate an example of Barnsley's Fern in AutoCAD, as part of my study of Iterated Function Systems. This page also demonstrates an alternative method in which to generate the Sierpinski Triangle by recursively applying one of three randomly selected transformations to a given point.

5th March 2016

I have updated my Random in Range function as part of my Random Number Functions to accept negative integer arguments and to also permit the arguments to be supplied in any order. This function will return a pseudo-random number within the range given by the two integer arguments.

28th February 2016

Following a suggestion from member 'Jef!' of the CADTutor forum, I have updated my Selection Set Processing tutorial to include an additional method: Method 4a: Reverse ssdel. This method demonstrates how to process a selection set by sequentially removing the entity at the (sslength - 1)th index until no entities remain in the set. I have also updated the page to include a table of contents to assist with navigation of the tutorial.

27th February 2016

I have updated my Arrow Arc program to Version 1.2. This new version offers an additional option within the aarcsettings command to allow the user to control whether the arrowheads are created at the start point, end point, or both the start & end point of the arc.

11th February 2016

I have updated my page exploring the mathematical objects known as Attractors to include an animated visual of the Lorenz Attractor.

23rd January 2016

Following user feedback, I have updated my Outline Objects program to Version 1.1. This new version will offer the user the option to erase the set of objects in the original selection.

16th January 2016

I have updated my Area Field to Attribute program to Version 1.2. This new version no longer restricts the user to selecting a visible attribute to house the resulting Field Expression, but instead allows the user to select any attributed block and will prompt the user to choose the attribute tag to be populated with the Field Expression if the selected block contains more than one attribute. The updated program also enables the user to predetermine the attribute tag to be populated with the Field Expression using a parameter defined in the program source code. Finally, this new version also accounts for 64-bit versions of AutoCAD 2008 in which the ActiveX getobjectidstring method is not available.

I have updated my Align Text program to Version 1.4. The new version includes an additional prompt for an optional line spacing factor which offers a default option allowing the user to retain the existing spacing between the selected text objects.

I have updated my Length at Midpoint program to Version 1.1. This update implements a new version of my LM:objectid function which has been modified to account for 64-bit versions of AutoCAD 2008 in which the ActiveX getobjectidstring method is not available.

10th January 2016

I have updated my Layer Director program to Version 1.4. The new version allows the user to cue an automatic layer change following the use of a custom AutoLISP command, and also adds the Layer Plot Style to the list of layer properties which may be configured by the program.

Following user feedback, I have updated my reactor-driven utility allowing a user to automatically select all MText content on a double-click to enable compatibility with Multileader objects, such that all MLeader text content is selected when double-clicking on an MLeader object.

1st January 2016  

For the first item of the new year, I shall share a new Polyline Taper program. This program will allow the user to apply a tapered width across all segments of a selected 2D polyline, and is compatible with polylines containing linear and/or arc segments, constructed in any UCS.

Finally, I shall take this opportunity to wish all visitors to my site a Happy New Year and all the best for a healthy & prosperous 2016!

31st December 2015

I have updated my Dimension Overlap program to Version 1.1. In this new version, the core function which performs the overlap test has been completely rewritten in order to account for dimensions which overlap on both sides, and to also enable compatibility with dimensions created in any UCS or construction plane.

28th December 2015

I have updated my Get Files Dialog function to Version 1.5; this minor update resolves a bug present in the filename sorting functions causing the function to error when processing file or folder names which contained a set of numbers interspersed with multiple points (e.g. "01.02.03").

24th December 2015  

As an early Christmas present, I have added a new tutorial to the site - Building Association Lists: A Simple Block Counter provides a step-by-step explanation of how to use an association list to construct a simple block counter program in AutoLISP, which will prompt the user for a selection of block references and will output the quantities of each block in the selection to the AutoCAD command-line.

Finally, I wish all of my readers a very Merry Christmas!

23rd December 2015

I have added a new Dimension Overlap program to the site. This program will automatically detect overlapping linear dimensions in all layouts and all blocks in the active drawing, moving such dimensions to a separate layer to be reviewed by the draftsman.

I have updated my set of Add & Remove Support File Search Paths functions to reduce the amount of code required for each function, improve the overall readability of the functions, and to ensure that the functions only modify the ACAD registry key if a modification is necessary.

21st December 2015

I have rewritten my old Sum Attribute Values program and have updated the program to Version 1.1. The new version allows the user to select which attribute tags are displayed in the table, and offers the ability to use field expressions to automatically update the table totals. Constant attributes with numerical content are also now included, and the table columns are sized appropriately for the content. I have also added a new GIF demonstration to show the program in action.

6th December 2015

I have updated my popular Incremental Numbering Suite application to Version 3.9. This relatively minor update improves the method used to determine the appropriate width for an MText object in order to account for multiple lines of text; removes the case-sensitivity of attribute tag comparison to account for applications which do not enforce uppercase attribute tags; and fixes a bug causing an oblique angle to be applied to single-line text if the current text style has an oblique angle set, but the text style selected for use does not.

2nd December 2015

I have updated my Layer Director utility to Version 1.3 - this release introduces several new features:

  • A new Force Layer Properties parameter determines whether the program will automatically modify the properties of existing layers in a drawing to match the properties defined in the program.
  • A new System Variables parameter incorporates the ability to configure any number of system variables when a command is invoked, with the system variables reset to their original values upon completing or cancelling the active command.
  • The Layer Description has also been added to the list of layer properties which may be configured by the program.

1st November 2015

I have added a new program to the site: Chain Length will allow the user to calculate the total object length between two points along a chain of connected objects. Be sure to also check out my related Chain Selection program, which allows the user to automatically select all connected objects following selection of a single object in the chain.

31st October 2015  

Following feedback received from a user of my programs, I have now updated my Burst Upgraded & Nested Burst programs to enable compatibility with non-uniformly scaled blocks. There remain some restrictions when attempting to burst nested blocks which are nested within non-uniformly scaled parent blocks, however these restrictions are inherent in the way that AutoCAD handles such objects.

11th October 2015

As an extension & generalisation of my old List Box Synchronisation tutorial, I have developed & published a new developer function to enable automatic DCL List Tile Dependency. This function automatically configures & manages a set of DCL list tiles (i.e. list_box & popup_list tiles) enabling dependency between the tiles - that is, the items displayed in a list tile will be dependent on the item selected in other list tiles.

10th October 2015

I have updated my Quick Field utility to account for selection of existing annotation objects (Text, MText, Attributes etc.) which already contain one or more field expressions.

6th October 2015

I have added a new Cursor Rotate program to the site. This program allows the user to rotate the AutoCAD crosshairs (SNAPANG system variable) to align with an object at a selected point, a fixed angle, or percentage representing a slope grade.

27th September 2015

I have further developed my Automatically Label Attributes program and have updated the program to Version 1.2. The new version enables full compatibility with multileaders containing attributed block content, and the user may configure the program to renumber attributed blocks, attributed mleaders, or both. The new version also rectifies a number of bugs present in the previous version, and restructures the program code to improve readability. There is also a new GIF animation for your viewing pleasure.

20th September 2015

I have updated my Automatically Label Attributes program to Version 1.1. The program has been completely rewritten to improve performance & stability, and the new version offers several new improvements, including the ability to match multiple block names & attribute tags using wildcard patterns, use a numbering prefix & suffix, specify a starting number, use fixed length numbering with leading zeros, and compatibility for multiline attributes.

19th September 2015

I have updated the page for my Group List by Number function to offer developers two types of function: the function LM:group<n will group a supplied list into sublists of a maximum length; whereas the LM:group-n function will group a list into sublists of a fixed length.

17th September 2015

I have tweaked the code for my Get Anonymous References function to allow the calling expression to supply the function with a wildcard pattern as the block name argument in order to match multiple block names.

12th September 2015

I have added a new Multi-Polyline program to the site. This simple program enables the user to create objects with the appearance of multilines, however which are composed of standard polylines.

30th August 2015

I have added a small reactor-driven utility to the site which causes the text content of an MText object to be automatically selected on a double-click. The idea was spawned from a question received from a visitor to my site who was looking for a consistent result when double-clicking on MText and single-line text (DText).

1st August 2015

I have added a new Justify Block Base Point program to the General Programs section of the site. Similar to my existing Change Block Base Point program, this new program allows the user to change the base point location for multiple blocks to one of nine standard justifications.

13th June 2015

I have updated my Incremental Numbering Suite application to Version 3.8. The new version enhances the 'Replacement Mode' option, which now allows the user to replace the text content of primary or nested text, mtext, dimensions, or multileaders containing mtext or attributed block content.

7th June 2015

Following user feedback, I have tweaked my Block Counter program to enable full compatibility with the ZWCAD application in which the ActiveX regeneratetablesuppressed property is not implemented.

3rd May 2015

I have added a new program to the General Programs section of the site: Double Extend allows the user to extend both ends of all lines, arcs, 2D & 3D polylines in a selection by a specified amount. As demonstrated, the program will perform successfully with both 2D and 3D objects, constructed in any UCS plane.

25th April 2015

I have updated my very old set of Polyline Programs, rewriting & consolidating the code for all three custom commands into a single program file. These simple programs allow the user to join sets of lines, arcs & polylines to form continuous polylines, close sets of open polylines, and modify the width of all segments for all polylines in a selection.

13th April 2015

I have revised my Update Titleblock Attributes application to Version 1.8 to incorporate a number of enhancements:

  • The program now permits the use of an optional 'Block Name' column in the CSV file from which attribute values are sourced, thus enabling the user to update multiple attribute tags held by blocks of a given block name, residing in a specific layouts within multiple drawings - automatically.
  • I have now added support for duplicate attribute tags: simply include multiple columns with the same attribute tag heading in the CSV file and the program will update the duplicate attributes in the order in which they are encountered in the block.
  • Attributed anonymous block references are now included by default when a custom block filter is used, to enable full compatibility with dynamic blocks.

I have updated my Polyline Information program to Version 1.3 to fix a bug causing the program to crash when constructing the table output for polylines containing arc segments.

22nd March 2015

Following feedback received from a frequent user of my Incremental Numbering Suite, I have updated the program to Version 3.7 to tweak the behaviour of the program dialog. The program will now set the initial focus of the dialog to the Prefix edit box tile, and the user may dismiss the program dialog at any time using the ENTER key.

15th March 2015

I have added a new Field Objects program to the General Programs section of the site. This program enables the user to easily view the object or set of objects referenced by all field expressions held by a selected Text, MText or Attribute object.

14th March 2015

I have updated my Ellipse to Arc program to incorporate some tolerance for the ellipse axis ratio into the selection filter in order to enable the user to select ellipses & elliptical arcs which are very close to being circular.

23rd February 2015

I have completely rewritten my Copy or Swap Text program and have up-issued the program to Version 1.4. The new version fixes a number of bugs reported from the previous version.

22nd February 2015

I have updated my Box Text program to Version 1.2. This new version allows the user to select multiple text or mtext objects, with each resulting text frame inheriting the properties of the enclosed text object.

I have performed minor updates to various pages of the site, such as Insert Nth, Intersection Functions to update the page layout, code headers & code formatting, and to include Tables of Content where appropriate.

15th February 2015

I have updated my Get Field Objects function to ensure that the function returns the objects referenced by all field expressions held by the supplied annotation object (where previously, only objects referenced by the first field expression encountered would be returned). The function has also now been renamed to Field Objects.

I have now rewritten my Get All Files function and have renamed this function to Directory Files. The code is now cleaner & substantially more concise, and the arguments for the function have been reordered to be in line with those used by the AutoLISP vl-directory-files function. An example program is included on the program page to demonstrate how this function may be used.

14th February 2015

I have updated my Effective Block Name page to include an additional function: Block Name to Effective Block Name, to allow a block name to be supplied as argument.

9th February 2015

I have updated my Incremental Numbering Suite application to Version 3.6. This minor update fixes a bug causing the program to crash upon selecting the 'Fixed' border option in conjunction with either a 'Rectangle' or 'Slot' border.

I have completely rewritten my set of Draw Order Functions and have up-issued the set of functions to Version 1.2. These functions now require one fewer argument and are now much cleaner & far more concise.

31st January 2015

I have updated the Geometric Intersections section of my library of Mathematical Functions to include an alternative version of my Circle-Circle Intersection function, and a new Arc-Arc Intersection function.

2nd January 2015

First & foremost, I wish all visitors to my site a very happy New Year and all the best for 2015!

To start the new year, I have added a new program to my site: Viewport Outline. This program allows the user to automatically generate a polyline in modelspace representing the outline of a selected paperspace viewport.

30th November 2014

I have added a new Outline Objects program to the site. This program enables the user to generate one or more closed polylines or regions representing a silhouette or outline of all objects in a selection.

22nd November 2014

I have updated my Automatic Block Break program to Version 1.7. The new version changes the method used to detect objects found at the block insertion point when determining the angle for automatic block rotation, fixing a bug causing polylines with non-zero width to be ignored.

15th November 2014

I have updated my recently published Selection Counter utility to Version 1.1 in order to fix a bug causing the MODEMACRO system variable to not be reset when the UNDO command is used.

13th November 2014

I have added a short & simple utility to the site which I have named Selection Counter. This reactor-driven application will silently run in the background and will automatically display the number of objects in the active selection at the AutoCAD status bar, offering an alternative to the Quick Properties functionality available in newer versions of AutoCAD.

8th November 2014

I have updated my Flatten List function to update the code formatting in line with my other functions.

1st November 2014

I have revised my Update Titleblock Attributes application to Version 1.7 to fix a bug causing drawings with filenames containing ASCII character 46 (point) to not be found within the first column of the CSV file.

12th October 2014

I have updated my library of Mathematical Functions to include a vector version of my Line-Circle Intersection function as part of my Geometric Intersection Functions, and a Quadratic Solution function as part of my Arithmetic Functions.

10th October 2014

I have added a new 2D Projection program to the site. This program provides the user with a means of projecting a selected set of planar objects from one reference frame (or projective space) to another, using a projective (or 'perspective') transformation.

9th October 2014

I have added a new Nested Burst program to the site. This program enables the user to burst (explode whilst retaining attribute values) a selection of block references, including any nested block references found within the selected blocks, nested to any level.

14th September 2014

I have updated my Strikethrough Text program to Version 1.1. The new version provides a generic function to allow the user to create any number of custom commands in order to generate any number of lines above, below or through selected text objects.

25th August 2014

I have added a new Circle Tangents program to the site. This program allows the user to dynamically construct two circles connected with a pair of lines meeting the circumference of each circle at a tangent. The program also utilises my recently published GrSnap utility to enable full Object Snap functionality at each prompt.

21st August 2014

After much delay, I have finally found some spare time to add my new GrSnap utility to the Subfunction Library section of the site. This utility was in fact written at the end of last year & provides a means of enabling the use of full Object Snap functionality within a grread loop.

Following the above addition, I have also added a new novelty program to my site: Star allows the user to create a customised star shape, constructed dynamically using a polyline object.

Finally, I have shared yet another dynamic program which also utilises my recently published GrSnap utility: my new 3-Point Rectangle program enables the user to dynamically construct a rectangle defined by three supplied points.

9th August 2014

I have updated my Get Files Dialog function to Version 1.4 to fix a bug causing folders with folder names containing a dot to incorrectly appear as selectable files.

5th August 2014

I have implemented a minor update to my Dynamic Attribute Width program to cause the attribute width factor to be reset to its original value should the user right-click during the operation of the program - this behaviour is more consistent with standard AutoCAD behaviour. The program is now at Version 1.2.

27th July 2014

I have added a new function: Evaluate Once on Startup to the Subfunction Library section of the site. This function provides the facility for a supplied expression to be evaluated only once on the next drawing startup, and not subsequently.

17th July 2014

I have updated my Areas to Field program to Version 1.3. This new version of the program will populate the contents of an AutoCAD table cell with the appropriate field expression if the point specified by the user is found to reside within a table cell.

21st June 2014

I have updated my Copy to XRef program to Version 1.2 to account for cases in which the XLOADCTL system variable is equal to 1, and also provide more detailed feedback to the user should the program fail to interface with the source drawing of the selected xref.

My Dynamic Attribute Width program has been updated to Version 1.1. The 'Reset' option in the new version will now reset the width factor of the selected attribute to that of its associated attribute definition, rather than always resetting the factor to 1.0.

19th June 2014

I have updated my HSL to RGB function as part of my set of Colour Conversion Functions to make the code more concise & readable.

15th June 2014

Count Version 1.4 released.

I have entirely rewritten my oldest & most popular block counting application: Count Version 1.4 should now be fully compatible with all full versions of AutoCAD (including 2015) running on both 32-bit & 64-bit Windows operating systems. The new version also offers an enhanced settings dialog, allowing the user to configure several additional parameters which were not available in the previous version.

I have also updated my Layer Director program to Version 1.2. The new version will allow the user to specify basic layer properties to be applied to layers which are automatically created by the program. I have also changed the loading method to use the post-initialisation s::startup function and have restructured the code used to construct the Visual LISP Command Reactor to hopefully resolve some reported issues in which the application was not automatically enabled for some drawing files.

14th June 2014

I have updated my Polyline Information program to Version 1.2 to fix a bug causing the final polyline segment to be omitted from output data when processing closed polylines.

8th June 2014

I have added a new program to the site: Dynamic Attribute Width will allow the user to dynamically alter the width factor of a selected attribute, with a real-time preview as the cursor is moved relative to the attribute.

I have updated my Incremental Array program to Version 1.7. This version fixes accumulated rounding errors appearing at item 44 onwards when incrementing a value of 1 by an increment of 1.

13th April 2014

My Reset XRef Layers program has been rewritten and the code updated to Version 1.2. The new version now also accounts for layers whose colour property has been assigned a True Colour or Colour Book colour.

I have updated my Incremental Numbering Suite program to Version 3.5 to fix a reported intermittent bug causing the program to crash when generating the first object after dimissing the program dialog with Dynamic Mode enabled.

Following the recent release of my heavily updated Incremental Array program, I have revised this program to Version 1.6 to correct a few minor bugs reported by Swamp user CAB.

I have completely rewritten my old Incremental Array program, and have updated the code to Version 1.5. This new version incorporates a more advanced incrementing engine similar to that used by my Incremental Numbering Suite application, and also allows the user to specify an increment value.

16th March 2014

My most popular and most extensively developed program, Incremental Numbering Suite has now been updated to Version 3.4. This new version fixes a number of bugs present in the previous version following bug reports submitted by numerous users which have accumulated since the release of Version 3.3 almost two years ago. For information detailing the changes to the program in this new version, please see the version history section of the program code header.

2nd March 2014

I am honoured to announce that I have been nominated to become a member of the prestigious Autodesk Expert Elite program!

27th February 2014

I have updated my Error Message Troubleshooter page to include several additional error messages and their accompanying explanations and possible causes.

23rd February 2014

I have updated my Burst Upgraded program to Version 1.2. The new version of the program has been restructured to accept a selection set argument, allowing the program to be called from other custom programs; the program will also now explode non-attributed blocks, rather than restricting the selection to only those with attributes.

I have added a new developer utility function to the site: Print List is a relatively simple (but incredibly useful) function to assist with the understanding of the structure of a given list. The function will print a supplied list to the command-line or file, with nested lists displayed in a hierarchical format so that the list structure is revealed.

16th February 2014

New program: Modelspace to Paperspace added to the site. Similar to the standard CHSPACE command, this program allows the user to copy a selection of objects from Modelspace to the current Paperspace layout, through an active viewport.

6th February 2014

I have updated my tutorial: An Introduction to Script Writing to include more detailed explanations & examples. This tutorial is a basic explanation of how to write & run your very first AutoCAD Script.

2nd February 2014

My Nested Block Counter has been updated to Version 1.5. The new version fixes a couple of bugs arising when counting nested dynamic blocks with different visibility states, and when counting multiple block references occurring several nesting levels deep.

My sincere thanks go to Helmut Schröder, who kindly brought these issues to my attention and also suggested possible fixes for the code.

I have completely rewritten my novelty Tip of the Day program; the new Version 1.1 ensures that the same tip is never displayed twice in a row, and provides the user with more control over the appearance of the tip dialog.

27th January 2014

Firstly, I would like to apologise to my readers for the distinct lack of updates to my site over the past month - my workload has increased substantially this year and my free time is unfortunately currently in short supply. To those who have contacted me directly, please know that I have received your messages, but finding the time to adequately respond to everyone in a timely manner is becoming increasingly difficult - for this I apologise.

Now to get back on topic, I am pleased to announce that my Change Block Base Point program has been published to the Autodesk Exchange App Store. I invite you to rate & review the app at your earliest convenience!

As with my other published applications, the published version of the program has a professional application installer and comes complete with a custom ribbon panel and individual toolbar icons for each command which may be used to launch the application.

The original program has also been updated to Version 1.5 to implement to some minor changes to the code in keeping with the published app.

31st December 2013

I have updated my library of Mathematical Functions to include a new set of Arithmetic Functions; such functions include calculation of the Least Common Multiple of two or more numbers, obtaining a list of Prime Factors of a number, and testing whether or not a given number is prime.

8th December 2013

I have updated the code for my old Elevation Marker program. This very simple program enables the user to create multiple elevation markers composed of a variable-width polyline and a text object displaying the UCS Y-coordinate of the picked point.

1st December 2013

New tutorial: The Apostrophe and the Quote Function. This tutorial provides a detailed explanation describing the behaviour & purpose of the apostrophe and equivalent quote function in AutoLISP.

28th November 2013

I have updated my set of Matrix & Vector Functions to update the matrix determinant function by ElpanovEvgeniy which calculates the determinant by transforming the matrix into upper triangular form; and also include my version of a matrix determinant function implementing Laplace's formula.

As a result of the modified matrix determinant function, I have also updated my 5-Point Ellipse function & Advanced Polyline Outline program to reflect the changes.

27th November 2013

I have updated the code for my Load Linetypes function to exclude known metric & imperial linetype definition files based on the value of the MEASUREMENT system variable, and also incorporate a boolean parameter to determine whether linetypes should be redefined from file if already loaded. I would like to thank Jason Bourhill from CAD Concepts for suggesting these improvements for the function.

Following a bug reported by a user, I have updated my Dynamic Block Counter program to Version 1.1. This new version fixes a bug causing the previous version of the program to error when processing non-uniformly scaled dynamic blocks, and also offers the user the ability to process a selection of blocks (rather than processing all blocks) and output the results to a Text or CSV file.

I have updated the code for my Selection Set Bounding Box function. This function returns the lower-left & upper-right coordinates of a rectangular frame bounding all objects in a supplied selection set.

17th November 2013

I have updated the code and function description for my Browse for Folder function; the code is now more concise and includes a smaller code header for a reduced footprint, and the function description page now includes an example function call with accompanying image, and a reformatted list of bit code values.

15th November 2013

Align Text to Curve Version 1.2 released.

The new version of the program has also been published to the Autodesk Exchange App Store!

The published version has a professional application installer and comes complete with a custom ribbon panel from which to launch the application. Feel free to rate & review the app!

After evaluating the wealth of feedback & suggestions submitted by numerous users of this program, I have invested some time rewriting & restructuring the entire program to implement many of the suggestions and also incorporate several new ideas of my own. This new release also improves the general performance of the program, providing a more stable and reliable program.

A number of the more significant changes and new features are detailed below:

  • New or existing Text and MText may now be aligned to Lines, Polylines, Arcs, Circles, Ellipses, Elliptical Arcs & Splines nested (to any depth) within blocks or xrefs.
  • The program now offers a new 'Settings' menu wherein the user can control the object type for new text created by the program, the justification of new text, the default offset factor & rotation, and many more settings.
  • A new 'Multiple Text Mode' allows the user to continuously place multiple text objects aligned to the same curve.
  • Text readability & rotation may now be altered during text alignment.
  • Several other program enhancements have also been implemented, but are too numerous to list here.

14th November 2013

New Show Hatch Text program added to the site. This program enables the user to clear the area of a hatch pattern obscuring selected Text and MText objects, or Text, MText and Attributes contained within selected primary & nested block references.

12th November 2013

I have added a new Length at Midpoint program to the site. This program automatically generates MText objects positioned over the midpoint of every object in a selection, with each item of MText containing a field expression referencing the length of the object.

New Field Formatting Code program added to the site. This utility enables the user to determine the field formatting code associated with the field expression held by a selected object, and may be used in conjunction with my Length at Midpoint, Areas to Field, and Area Field to Attribute programs in order to determine the correct field formatting code to use with each of the programs.

I have updated the descriptions for my Areas to Field, and Area Field to Attribute programs to update the set of instructions indicating how to determine the correct field formatting code to use with each program.

6th November 2013

I am delighted to publish a very appreciative and complimentary testimonial received from the tremendous folk at Momentum Engineering - thank you!

29th October 2013

New Offset Polyline Section program added to the site. This program enables the user to offset a section of a polyline enclosed by two selected points on the polyline.

I have updated my set of Colour Conversion Functions to improve the concision of the code for many of the functions.

25th October 2013

Added MD5 Cryptographic Hash Function to the Subfunction Library section of the site. This function is an AutoLISP implementation of the MD5 message-digest algorithm developed in 1992 by Ronald Rivest.

24th October 2013

My Error Message Troubleshooter has been updated to add the bad argument type: streamp error message, and to also include possible AutoLISP functions pertaining to the cause of each error.

23rd October 2013

I have recently updated my Minimum Bounding Box function to overhaul the old function code, include additional error trapping, and furthermore update the code formatting to meet my current standard.

18th October 2013

I am pleased to list DuctiSoft as a friend of Lee Mac Programming. Andrea Andreetti, the proprietor of DuctiSoft, is a very creative programmer whom I have had the pleasure of collaborating with in the past to create a novelty Dynamic Laser program (requires Swamp membership to view).

10th October 2013

My Extract Nested Block program has now been published to the Autodesk Exchange App Store! The published version has a professional application installer and comes complete with a custom ribbon panel from which to launch the application. Feel free to rate & review the app!

9th October 2013

I have now updated my Circular Wipeout program to Version 1.2. This version fixes a UCS bug arising when the UCS origin is not equal to the WCS origin.

2nd October 2013

I am pleased to list Paul Stafford's blog: CADsmarter as an affiliate site of Lee Mac Programming. Paul's blog is relatively new, but already contains many useful tips & tricks to help you get the most out of AutoCAD.

1st October 2013

Following a bug reported by a user, I have updated my Automatic Block Break program to Version 1.6. The updated version fixes a bug causing the program to return an error if an object intersected the bounding box of the block at only one point.

12th September 2013

I have recently updated my set of Attribute Functions to fix a few minor bugs, improve the concision of the code, and update the formatting to be consistent with my other function sets.

11th September 2013

My Steal & Associative Textbox programs have now been published and are available to download from the Autodesk Exchange App Store! These published versions come complete with professional application installers and custom ribbon panels from which to launch the applications.

You are invited to rate & review the apps!

9th September 2013

I have updated my Extract Nested Block program to Version 1.1. The updated version incorporates additional error trapping to prohibit selection of blocks nested within dynamic blocks or xrefs (with which the program is incompatible), and nested blocks residing on locked layers. The program will also now ignore non-uniformly-scaled block references (for which the previous version returned an error).

6th September 2013

My Background Mask program has now been published and is available to download from the Autodesk Exchange App Store. The published version includes an application installer and a custom ribbon panel from which to launch the application. Feel free to rate and review the app!

I am pleased to announce that gileCAD is now an affiliate of Lee Mac Programming. Gilles Chanteau, the proprietor of gileCAD, is an incredibly talented programmer who I have had the pleasure of knowing for several years, and from whom I have learnt a great deal.

3rd September 2013

My Batch Attribute Editor program is now also available to download from the Autodesk Exchange App Store! The version published at the Exchange App Store comes complete with an installer and also features a custom ribbon panel from which to launch the program.

Feel free to rate & review the app and let me know what you think!

1st September 2013

A new novelty program gift to my readers for the first post of September: Password Generator was inspired by a recent 'challenge thread' posted at TheSwamp CAD forum, and will generate a pseudo-random password string based on the parameters specified.

31st August 2013

I have updated my Nested Move program to Version 1.2. The new version implements a fix for a bug causing the program to crash when a nested attributed block or nested 2D/3D Polyline is selected.

29th August 2013

My Burst Upgraded program has now been rewritten and updated to Version 1.1. The new version has cleaner & more concise code, with additional error trapping to account for xrefs and objects on locked layers. I have also included an animated demonstration to exhibit the program capabilities.

26th August 2013

Following valuable feedback received from several users, my Nested Move program has now been updated to Version 1.1. The new version allows the user to select multiple nested objects (with the same parent) to be moved, with selection highlighting to provide visual feedback for the selected objects. The new version will also move only the 'outermost' nested object when the user has selected an object nested several levels deep - this also resolves an issue in which the user could move nested dimension components. The accompanying animated demonstration has also been updated to reflect the new functionality.

25th August 2013

List Box function rewritten and updated to Version 1.2. This updated version alters the third argument for the function to a bit-coded integer controlling whether the list box permits selection of multiple items, and also whether the function will either return a list of selected items or a list of zero-based indexes corresponding to the position of each item within the supplied data set - a necessary enhancement when working with data containing duplicate items.

I have uploaded a sample zip folder containing an example CSV file & accompanying sample drawing containing an attributed block for use with my Update Titleblock Attributes program.

21st August 2013

Added new LM:sfsp+n (Add Support File Search Paths at n) function to my set of Support File Search Path Functions. This function will add a list of paths at a position in the list of AutoCAD Support File Search Paths given by a supplied zero-based index parameter.

20th August 2013

My old Centerline program has recently been rewritten & updated to Version 1.2. The new version has cleaner code and performs successfully on a wider range of CAD platforms following a recently received bug report submitted by an avid user.

19th August 2013

I have recently updated my entire set of Dynamic Block Functions. The code for each function is now clearer & more concise, and the functions have a reduced footprint, carrying smaller code headers. A new LM:ToggleFlipState function has also been added to allow a developer to effortlessly toggle the Flip State Parameter held by a Dynamic Block reference.

14th August 2013

I am pleased to list PHCAD as an affiliate of Lee Mac Programming. Paul is a talented & certified professional draughtsman and, in addition to advertising his services, his site offers free resources in the form of LISP tips & an expanding block library.

10th August 2013

Inspired by a request posted at the Autodesk Discussion Groups, I have added a new Nested Move program to the site. This program enables the user to move a selected object nested within a block, dynamic block or xref (nested to any depth), without opening the xref source drawing.

7th August 2013

I am pleased to list Matthew Nichols' blog Talk about CAD as an affiliate of Lee Mac Programming. Matthew's blog is packed with useful information and includes several macros & DIESEL examples for LT users who unfortunately cannot take advantage of AutoLISP.

2nd August 2013

New ssget Function Reference added to the Programming References section of the site. This reference includes information gathered over the years from various sources, including information on undocumented ssget functionality and several examples to demonstrate function usage.

27th July 2013

I have extensively updated my tutorial on Debugging Code with the Visual LISP IDE to include better explanations for actions performed in the tutorial, and clearer & cleaner graphics & animation.

25th July 2013

Following a bug reported by a user, I have updated my Get Files Dialog function to Version 1.3; this update fixes a bug wherein the function would crash if the user double-clicked in empty space in the left-hand list box pane.

23th July 2013

I have now rewritten my Create Directory function to improve the concision & readability of the code. This function will recursively create each level of a supplied directory folder structure.

14th July 2013

Following the recent addition of my Match Field Formatting program, I have now also added a new Copy Field program to the site. This program enables the user to copy a field expression from a selected source object to multiple destination objects in a drawing.

My Copy to XRef program has now been completely rewritten and updated to Version 1.1; the new version incorporates substantially improved error trapping and improves code readability in general. An animated demonstration of the program in action has also been included on the program page.

12th July 2013

I have added a brand new Match Field Formatting program to the site. This program enables the user to copy the formatting from a selected source field expression to multiple destination fields in a drawing.

Following the above addition, I have also included my Field Code function in the Subfunction Library section of the site. This function is heavily utilised by my recently added Match Field Formatting program, and will return the field expression associated with a Text, MText, Attribute, MLeader, or Dimension object.

8th July 2013

My Copy to Layouts program has now been completely rewritten and updated to Version 1.1. The program enables a user to copy a selection of objects to all or selected layout tabs in a drawing; this updated version is more robust with cleaner code for improved readability.

5th July 2013

I have now updated my Copy or Rename Block Reference program to Version 1.5; this new version enables the user to copy or rename anonymous block references in a drawing.

16th June 2013

My Copy or Rename Block Reference program has now been completely rewritten and updated to Version 1.4. The code for the updated program has improved clarity, concision and readability, with additional error trapping to allow for block references residing on locked layers.

Following the recent update of my Copy or Rename Block Reference program as noted above, my Copy Block Definition function has also been rewritten and similarly improved.

I have rewritten my old Copy Block from Drawing program and have renamed the program to a more apt: Import Block. This program is the precursor of my far more generalised and extensively developed Steal from Drawing program and allows a user to import a block from a selected drawing file into the active drawing, without opening the external file.

15th June 2013

My novelty Clock application has now been completely rewritten and updated to Version 1.1. In addition to incorporating cleaner and far more efficient & readable code, the new version also includes a new runclock command, enabling the user to run the clock continuously. I have also rewritten the description found on the program page and have added a new animation to demonstrate the program in action.

I have updated my LM:RGB->ACI & LM:ACI->RGB functions as part of my set of Colour Conversion Functions, following a reported bug.

7th June 2013

I have updated my set of Column Reference Functions; these functions are ideal for converting and manipulating alphabetical 'column references' (e.g. A,B,...,Z,AA,...) as used by applications such as Excel. I have also provided alternative versions for many of the functions in order to demonstrate different ways to obtain the same result. A table of contents has been included on the page for ease of navigation.

6th June 2013

I have updated my set of Colour Conversion Functions to provide functions for conversion between all 5 colour enumerations listed on the page; a table of contents has also been included for ease of navigation.

2nd June 2013

New Object Break program added to the General Programs section of the site. This program is a generalisation and enhancement of my existing (and recently updated) Circle Break program, enabling the user to break a selected object either at two specified points, or at two points of intersection with another selected object, and apply a set of properties to the selected portion of the object.

30th May 2013

My Circle Break program has now been entirely rewritten and updated to Version 1.3. The much improved new version enables the user to use the program with ellipses in addition to circles, and apply a whole set of properties to the 'hidden' arc or elliptical arc, as opposed to simply assigning a layer as performed by the previous version. The accompanying program description has also been rewritten and a new animated demonstration has been included.

28th May 2013

My Change Block Insertion program has been completely rewritten and updated to Version 1.4; I have furthermore renamed the program to a more appropriate: Change Block Base Point. Please note that the commands for this program have also been renamed accordingly. I have also rewritten the accompanying program description, providing an explanation for each available command, and including a new animated demonstration.

26th May 2013

I have completely rewritten my set of functions which enable a user to Add & Remove Support File Search Paths and have also updated the accompanying function description found on that page.

My Area Field to Attribute & Areas to Field programs have also been completely rewritten and updated to Version 1.1 & Version 1.2 respectively, to improve the readability of the code and to enable the user to easily configure the area format of the Field generated by the programs. The accompanying program descriptions have also been heavily updated to provide instructons detailing how to determine the correct Field formatting code when configuring the area format.

I have updated my Arrow Arc program to Version 1.1; the new version incorporates an aarcsettings command to enable the user to control the length & width of the arrow heads without modifying the program source code.

I have updated and reformatted my set of Attribute Functions and Base Conversion Functions; the functions are now clearer and carry smaller code headers.

My very old Box Text program has been completely rewritten to vastly improve the readability of the code and to fix a few general bugs.

22nd May 2013

Following a bug report, I have updated my Read CSV function to Version 1.3 to correctly process some uncommon cell values containing a certain combination of comma & quote characters. I have also updated my complementary Write CSV function and have condensed the code for both functions, resulting in improved readability & performance.

I have furthermore revised my Update Titleblock Attributes program to Version 1.6 in order to incorporate the above changes to my Read CSV file parsing function and to remove the need to include the file extension when listing drawings in the CSV file read by the program.

17th May 2013

I have now updated my old Copy to Drawing program to Version 1.2 and have renamed the program: Copy to Drawings. As the new name suggests, I have now lifted the single drawing restriction, with the updated version allowing the user to copy a selection of objects to an entire set of drawings, without opening each drawing in the AutoCAD Editor.

4th May 2013

I have now included a new tutorial on the topic of Selection Set Processing to the AutoLISP & Visual LISP Tutorials section of the site. This tutorial demonstrates a variety of different methods of how to iterate over all objects in a selection set, together with a brief explanation of how each method works and the efficiency of its operation.

1st May 2013

Updated my recently released Associative Textbox program to Version 1.2 to fix a bug causing MText & LWPolyline objects residing in Paperspace Layouts to be transferred to Modelspace.

30th April 2013

Updated Associative Textbox program to Version 1.1 to fix a bug causing the program to crash during loading if other reactors with reactor data with non-string data type are already running in the active drawing session.

Added Associative Textbox program to the site. This reactor-based program enables the user to create an associative textbox surrounding a Text or MText object, with the size, position, orientation & rotation of the textbox frame automatically updated following modification to the associated Text or MText object.

Added Filtered List Box function to the Subfunction Library section of the site. Similar to my existing List Box function, this function also presents the user with a dialog interface containing a list box tile from which the user may select one or more items, however, the displayed dialog for this function also includes an edit box tile, enabling the user to filter the list of items displayed.

23rd April 2013

I have updated my Align Text program to Version 1.3; this version allows the user to reposition a selection of single-line text objects with any rotation, aligned in a direction perpendicular to the text rotation. The updated program will furthermore perform successfully with text constructed in any UCS plane.

18th April 2013

I have updated my Total Length & Area Programs to simplify the code and improve the readability & consistency of the programs.

My Get Files function has been completely rewritten and updated to Version 1.2. The updated version implements a bug fix to account for Library folders encountered with Windows 7, and also incorporates a new and improved file sorting function.

ObjectDBX Wrapper function completely rewritten and updated to Version 1.2 to include more error trapping and to condense the code, improving both readability & performance. Directory Dialog function also updated and renamed to BrowseForFolder for consistency with the method used by the function.

28th March 2013

I have updated my GrText function to Version 1.1. The function has been completely rewritten with the previous 'Extended ASCII' version now included in the main function for consistency. The redundant colour argument has also now been removed to improve compatibility when the function is used with DCL. The program page has also been overhauled to provide a far better description of the various demonstration programs, which have also been rewritten and updated.

8th March 2013

Added Text to Words program to the site. This program enables the user to convert a selection of single-line text objects into separate text objects for every word in the selection, whilst retaining all properties of the original objects.

Added Arrow Arc program to my library of General Programs. This program enables the user to construct an arc with arrowheads at each end point, aligned with the arc.

Added Drawing Version function to the Subfunction Library section of the site. This function will return a string describing the drawing version of a supplied drawing file, if possible.

5th March 2013

I have added the functions Matrix Inverse (gile / Lee Mac) & Identity Matrix to the Matrix & Vector Functions section of my Mathematical Functions page. The Matrix Inverse function uses the technique of Gauss-Jordan elimination to calculate the inverse of a given nxn non-singular matrix. The original version of this function was written by the talented gile (Gilles Chanteau), which I have modified for increased performance & concision. The included Identity Matrix function will return an nxn Identity Matrix with dimension given by the supplied integer parameter.

Updated my Dump Object utility function to Version 1.1 to improve the function structure & readability.

4th March 2013

My Automatic Block Break program has been mostly rewritten and updated to Version 1.5 to incorporate a new & improved function to calculate the rectangular bounding box of a block, resulting in accurate results when applied to Dynamic Block references; and furthermore to fix a bug wherein the program would attempt to break Multiline objects. Other minor changes have also been implemented to improve and streamline the program.

I have also updated the Automatic Block Break program page, rewriting the description to describe each available command in greater detail and to include several new animations to better demonstrate the program capabilities.

Updated my Mapcar & Lambda tutorial to reformat the examples and fix a reported broken link.

10th February 2013

Following recent development of my 5-Point Ellipse function, I have added a new Advanced Polyline Outline program to the General Programs section of the site. The program allows the user to construct an outline silhouette of an LWPolyline with straight and/or arc segments with varying or constant width.

Added 5-Point Ellipse function to the Subfunction Library section of the site. This function will return the parameters of the unique ellipse passing through five supplied points, if such an ellipse exists. The method used to determine these parameters is described on the function page linked above.

Added Matrix Determinant (by ElpanovEvgeniy) & Matrix Trace functions to the Matrix & Vector Functions section of my Mathematical Functions page; as the names indicate, these functions will respectively calculate the determinant and trace of a given nxn matrix.

6th February 2013

Updated Background Mask program to Version 1.1 to alter the command syntax for the program to bmask, since mask is an existing command in AutoCAD Civil 3D. The update also implements several other minor improvements to the code.

2nd February 2013

Added Ellipse to Arc program to the site. This program will allow the user to convert a selection of circular Ellipses & Elliptical Arcs (that is, Ellipses or Elliptical Arcs with axes of equal length) into Circles & Arcs respectively, whilst retaining all properties of the original objects.

I have also updated my Circular Wipeout program to Version 1.1. This updated version includes an additional command, c2wipe, which enables the user to convert a selection of circles to circular wipeouts.

1st February 2013

I have updated the Testimonials section of the site to include an appreciative & commendatory testimonial kindly written by Henry Blake, owner of WoodBlocX - Many thanks Henry!

29th January 2013

Added Circular Wipeout program to the site. As the name implies, this program enables the user to create a circular wipeout with a given center & radius in the drawing.

28th January 2013

I have updated my set of Unique & Duplicate List Functions to rewrite & improve many of the existing functions and moreover to include iterative versions of every function listed. I have also added a table of contents to facilitate navigation of the page.

It's a bit late in the month, but I wish all of my readers best wishes for 2013!

24th December 2012  

To keep with the festive theme of this time of year, I have published an article exploring the curious & intriguing geometrical properties of the Koch Snowflake. This program may be found under the Mathematical Endeavours section of the site.

I have also updated my study of various chaotic Attractors to include a table of contents, clearer systems of equations for each attractor, greatly improved & more readable code, and finally, a derivation for the Duffing Oscillator.

Finally, I wish all of my readers a very Merry Christmas!

18th December 2012

Added Chain Selection program to the site. This program prompts the user to select an object and generates a 'chain selection' of all objects sharing endpoints with objects in the accumulative selection.

Included Add Polyline Vertex program in the General Programs section of the site. As the name implies, this program allows the user to add a new vertex to an LWPolyline object.

14th December 2012

Updated Align Objects to Curve program to Version 1.3 to enable the user to align the selection of objects to a nested curve within a Standard or Dynamic Block or XRef, nested to any level.

11th December 2012

My Align Objects to Curve program has now been completely rewritten and updated to Version 1.2 to enable the program to perform successfully in all UCS & Views. The alignment controls offered by the program have also been refined, with the additional option to allow the user to rotate the set of objects relative to the selected curve.

I have also updated the Testimonials section of the site to include a very complimentary testimonial kindly written by Joey Smith from Arning Companies, Inc. - Many thanks Joey!

6th November 2012

Added functions LM:Reflect & LM:InsideTriangle-p to my set of Mathematical Functions. The former will reflect a given point in the axis defined by two supplied points in the plane; the latter is a predicate function which will return T if a given point lies within a triangle defined by three supplied points. In addition to the inclusion of these supplementary functions, I have also organised the library of Geometric Functions into appropriate sub-categories for ease of navigation.

31st October 2012  

As a treat for Halloween, I have added a new novelty program to the site. Lottery Numbers is a relatively simple novelty program generating a sequence of random numbers in the form of lottery balls in the drawing. Good luck!

21st October 2012

I have updated my library of Intersection Functions; this set of functions provides the ability to retrieve points of intersection between either two objects, all objects within a Selection Set or list, or between objects of two Selection Sets or lists. The functions have been completely rewritten to improve readability, concision & performance, and the entire function page has been overhauled to provide detailed information about every function, including animated demonstrations and diagrams.

16th October 2012

I have updated my Mathematical Functions page to incorporate a set of Complex Number Functions, pertaining to the arithmetic manipulation of complex numbers; and Factorial Functions, which may be used to calculate the factorial of a positive integer, in addition to the multiplication and division of two factorials. I have also renamed several of the Matrix & Vector Functions present on the page to improve consistency. Various Geometric Functions have also been updated to reflect the renamed function names and earlier modifications to the Polygon Centroid function.

Updated Polygon Centroid function to account for the case in which the coordinate scale factor is zero, and hence eliminating a potential divide-by-zero error.

I have updated the Testimonials section of the site to include a testimonial kindly received from John Hailey at CBI/Matrix Engineering - thanks John!

12th October 2012

Added set of Random Number Functions to the site. These functions involve the generation and manipulation of pseudo-random numbers using a linear congruential generator.

Updated Popup function to Version 1.1 to revise the code formatting and improve the readability of the function.

8th October 2012

I am pleased to list Paul Munford's blog The CAD Setter Out as an affiliate site of Lee Mac Programming. Paul's blog is packed with useful information on AutoCAD and Inventor, including a cornucopia of tips, tricks and tutorials exuding Paul's evident enthusiasm for everything CAD related. I also encourage followers of my site to vote for my link as your favourite CAD site on his links page here.

5th October 2012

Added Isometric Polygon program to the site. This program enables the user to construct a regular polygon projected in the active isometric plane.

19th September 2012

I have updated my Update Titleblock Attributes program to Version 1.5. The new version of the code revises the CSV file parser function to account for the use of alternative cell delimiter characters (such as a semi-colon) used by some systems.

18th September 2012

Updated Steal program to Version 1.8. This revision fixes a minor bug present in the recently released Version 1.7 wherein the program would error if all items in a selected collection were deselected by the user using the Ctrl key, and then the Import button is pressed. Furthermore, in this updated version, the active drawing will only be regenerated (following program completion) if one or more items have been imported by the program.

16th September 2012

Steal Version 1.7 released.

After evaluating the excellent feedback submitted by numerous users for this program, and having reviewed the many suggestions for improvement that were submitted since the program was first released to the public, I have invested some time implementing many of the proposed ideas and have injected a few additional features of my own into this new release of my Steal from Drawing program.

This release also improves the general performance of the program, with much of the original source code rewritten and restructured, furthermore, some previously undetected bugs have now been ironed out to provide a more stable and reliable program.

A number of the more significant changes and new features are detailed below:

  • The Steal file selection dialog will now remember the directory of the last selected drawing between drawing sessions so that the user will spend less time navigating a project folder structure when selecting a drawing to steal from.
  • Groups, Drawing Properties and Custom Properties have all been added to the list of collections from which the user can steal items. The inclusion of Drawing Properties was a popular request for the last program, so this new addition should hopefully benefit a large proportion of users.
  • A Refresh button has now been incorporated into the dialog to enable the user to refresh the drawing data after importing items with object dependencies (for example, importing blocks or groups will also import dependent layers, linetypes, nested blocks etc.).
  • The Search button has been exchanged for an appropriate bitmap icon and I have replaced the multiple alert dialogs with a rather more subtle dialog error tile for a more streamlined user experience.
  • Two new commands have been added to the program: StealLast allows the user to immediately steal from the last selected drawing (if available); and StealTemplates enables the user to steal items from a specific template file, selected from a list of template files found in the template drawing path.
  • Several other general improvements and bug fixes have also been implemented and are detailed in the program code header.

9th August 2012

Added Polyline Information program to the General Programs section of the site. This program provides the user with detailed information about every segment of a selected LWPolyline in the form of an AutoCAD Table (if available), Text file, or CSV file.

2nd August 2012

Updated my Batch Attribute Editor program to Version 1.4. This version implements a refined file and folder sorting function to emulate the Windows Explorer filename sort when selecting drawings to be processed by the program. The updated program also increases the character limits of the edit_box tiles in the dialog to allow for the use of long Field Expressions in attribute values. Other general bug fixes are noted in the program code header.

27th July 2012

Added HTML versions of many of the programs available for download on the site, allowing the user to view the program source code directly in the web browser, with the choice of three syntax-highlighting themes. Take a look at the various programs under the General Programs section of the site, and click on the 'View HTML Version' link try this new feature of the site.

21st July 2012

Added Delete Blocks program to the site. This program enables the user to quickly remove all traces of multiple blocks from a drawing.

20th July 2012

Updated List Box function to standardise code formatting and rewrite several expressions to improve clarity and readability.

18th July 2012

Updated Create Directory, Copy Folder & Apply to Block Objects functions to restructure and standardise code formatting and improve readability.

17th July 2012

I have once again updated my Nested Block Counter to Version 1.4 to implement another fix for an issue relating to counting Standard Blocks nested within Dynamic Blocks which are using different Visibility States. This issue should now (hopefully) be fully resolved.

12th July 2012

I have restructured and rewritten several sections of my Error Handling tutorial to provide clearer explanations and cleaner code samples.

11th July 2012

I have updated my Nested Block Counter program to Version 1.3. This update provides a fix for an issue arising when counting Standard Blocks nested within Dynamic Blocks which are using different Visibility States. The new version also offers the ability to extract the block report to either a Text or CSV file.

3rd July 2012

Added Write CSV function to enable a user to write a list of cell values to a CSV file. An example program is also included on the program page, demonstrating the ease of constructing a program to extract point data to a CSV file by utilising the LM:WriteCSV function.

Updated my Read CSV function to restructure the code for better readability and performance, provide support for international systems which do not necessarily use a comma as a CSV delimiter character, and improve the cell parsing function to return more accurate results for cells containing commas and quotes.

Minor updates to my Bulge Conversion Functions to update the code formatting, shorten and improve the test functions and re-order the returned values for my Arc->Bulge function to reflect the order in which the values are used when constructing an LWPolyline.

23rd June 2012

Updated set of Draw Order Functions to Version 1.1. This update is a complete overhaul of the code for both the draw order functions and example custom draw order programs found on the program page. The functions now provide support for 64-bit systems, and the example programs will now process objects on locked layers.

18th June 2012

Incremental Numbering Suite Version 3.3 released.

After much planning, experimentation, redesign and deliberation of ideas for new features, I have finally released the new version of by far my largest, most popular and also most extensively developed program:

I present Version 3.3 of my Incremental Numbering Suite.

This release includes more changes and is packed with more new features than any other release since the program was first drafted. The Program Description has also been predominantly rewritten to document all of the new program functionality.

A number of the more significant changes and new features are detailed below:

  • I have added the ability to increment multiple sections of the incrementing string: the previous radio button controls which were used to allow the user to decide which section of the string is to be incremented have now been replaced with toggle controls to enable the user to increment any or all sections of the string, alphabetically or numerically simultaneously.
  • I have added the ability to create an array of incrementing Text, MText or Block objects, with the selected object aligned or perpendicular to the array, or with rotation set to an entered arbitrary angle, or an angle picked from the drawing. This is probably the most significant addition to the program operation, providing an additional method for the user to generate the incrementing text in a drawing, with all of the existing formatting options applied. This new functionality is described in more detail on the program page under the section Creating an Array, which also includes several animated examples to demonstrate.
  • Included a set of controls within the Formatting section of the dialog to give the user the ability to control MText Background Mask offset factor and colour. The controls are very similar to my existing Background Mask program, so frequent users of my programs will already be familiar with how to operate this section.
  • Added the ability to specify the block scale as an arbitrary value, a value picked from the drawing, or based on the value of a selected System Variable. In previous versions of the program, a block would always be inserted at 1:1 scale, offering no option to change this scale. This new version not only allows the user to enter or pick any scale value, but the scale can also be directly dependent upon the current settings of a selected System Variable.
  • Provided the user the option to pick the Text Height value from the drawing. This change is to conform with the other edit box input sections of the dialog which require a numerical value, allowing the user to pick a value from the drawing itself.
  • Text & MText Border Offset is now a factor of text height where an offset factor of 1.0 exactly fits the Text or MText object, a factor of 1.5 extends the border by 0.5 times the text height etc. This emulates the behaviour of the newly implemented MText Background Mask, and enables the user to easily create a rectangular border around the background mask by specifying the same offset factor for both. This to me seemed more intuitive.
  • Added the ability to increment the string during placement by pressing the I / i key. This change followed from the 'toggle counter' control (T / t), and allows the user to increment the string independently.
  • As a rather more aesthetic change: I have redesigned 'About' dialog to include appropriate bitmap images and a stylized program title. Following with the aesthetic theme, I have also redesigned all object selection and pick buttons to conform with standard AutoCAD dialog interfaces to make users feel more 'at home' with the program.
  • Finally, where general bug maintenance is concerned: I have fixed a bug causing program to crash if the Object type is set to 'Text' and Text Alignment is set to 'Left', then the Object type is switched to 'MText'.
  • I have also fixed a bug in which the program would check for possible incorrect border parameters when the Object type is set to 'Block' (in which no border may be used).

16th June 2012

Added Consistent rtos function to the Subfunction Library section of the site. This fairly simple wrapper for the rtos function will always return the result of evaluating the rtos function with the DIMZIN System Variable set to 0, thus eradicating any incongruency when using this function in different drafting environments.

14th June 2012

Added Version 1.1 of my Label program to the site. This program is a stripped down, faster & improved version of my previously published Align Text to Curve program; the program has been streamlined to allow the user to create MText 'labels' dynamically aligned to a selected primary or nested object, with additional placement controls available at the command-line.

10th June 2012

Modified the following programs to both update code formatting and improve the flow & readability of the code:

18th May 2012

Added Extract Nested Block program to the General Programs section of the site. This program will allow the user to convert a nested block into a primary block inserted at the same position for each reference of the nested block, with the same scale, rotation, orientation and all other properties possessed by the original nested block.

5th May 2012

My Batch Attribute Editor has now been upgraded to Version 1.3. This update implements several new features in addition to remedying a couple of minor bugs present in the previous versions.

A brief summary of the notable improvements have been included below:

  • The attribute modification module has been completely rewritten to utilise Visual LISP methods, enabling processing of Multiline Attributes and also permitting the use of Field Expressions in attribute values.
  • I have added the ability to use incrementing attribute values in attribute data. If an attribute value contains markers <# and #> surrounding numerical data, the numerical section between these markers will be incremented by one for each drawing processed by the program. More information about this feature is detailed in the program description, under the section entitled: Incrementing Attribute Values.

29th April 2012

Updated my Steal program to Version 1.6. Amongst other general updates to the program code, this version fixes a bug causing the program to crash for versions in which some collections are not available.

24th April 2012

Updated Layer Director to Version 1.1. In this version, the majority of the program has been rewritten to streamline the code. The previous Command Reactor toggle has been removed in lieu of two separate commands to switch the program on & off; this alteration follows reports by users that the previous version would toggle on then promptly off when loaded through the Startup Suite.

20th April 2012

Updated Quick Field program to Version 1.1. This version implements a fix for a reported bug which was causing the program to crash when used in 64-bit environments.

16th April 2012

Added Background Mask program to the site. This program allows the user to manipulate all properties of the background mask for a selection of Multiline Text (MText) and Multileader (MLeader) objects.

14th March 2012

Areas to Field program completely rewritten to incorporate better support for 64-bit systems and also improve code readability. GIF demonstration added to the program description page.

5th March 2012

I have updated my Batch Attribute Editor program to Version 1.2. This update hopefully implements a fix for the scripting bug present in previous versions of the program, and also offers the user the ability to select multiple attributed blocks from the active drawing whose attribute values may be added to the list of items to be modified. This should no doubt greatly reduce the tediousness of manually inputting the attribute information.

2nd March 2012

Updated Incremental Numbering Suite program to Version 3.2. This update fixes a number of bugs, the most prominent pertaining to the collection of attributed block data.

26th February 2012

Rewritten the code for Copy Block from Drawing program to make it consistent with many of my more recent programs and furthermore to improve code readability.

22nd February 2012

I have completely rewritten my Slinky Text program and have updated the program to Version 1.4. This new version has cleaner code and includes several performance enhancements which should allow the program to run smoother.

18th February 2012

Added Format DCL program to the Utilities section of the program page. This program will read a selected DCL file and create a formatted version of the DCL code in the same directory as the selected file.

10th February 2012

Updated Batch Attribute Editor to Version 1.1. This update fixes some scripting issues reported in the last version and splits the main dialog into two separate screens to account for those users without access to a widescreen resolution. More information about the update can be found in the program code header.

8th February 2012

ObjectDBX Wrapper function completely rewritten. I have also extensively updated the program description and have included several examples demonstrating how to use the program.

30th January 2012

In June of 2009 I put together the first version of my Global Attribute Extractor & Editor program, offering the user the ability to extract attribute data from multiple blocks in many drawings, and edit several attributes in a block across multiple drawings.

This program used ObjectDBX to process many drawings very quickly, but this approach also included drawbacks stemming from the underdevelopment of the ObjectDBX interface, which, to this day, still has bugs. Furthermore, the Editor part of the program only offered the ability to modify attributes in a single block.

Almost three years later, I am now offering a new Batch Attribute Editor program. This program allows the user to modify the values of multiple attributes residing within multiple attributed blocks across multiple drawings. A full description of this new and improved program may be found on the dedicated program page.

20th January 2012

Added Escape Wildcards function to the Subfunction Library. This function will escape wildcard characters found in a supplied string, ensuring such characters are interpreted literally.

Updated the Testimonials section of the site to include a very kind testimonial from Clint Hill at Innophos, Inc. Many thanks Clint!

19th January 2012

Added LISP Command Logger program to the site. This program will automatically (and silently) record daily LISP command usage in every drawing to a CSV Log File, saved to a folder specified in the program source code.

17th January 2012

Added Nested Block Counter program to the list of General Programs. This program will generate a report detailing the individual quantities of primary and nested blocks, dynamic blocks & XRefs in a selection or an entire drawing.

16th January 2012

Updated Read CSV function to return the correct content of CSV cells containing commas and quotes, and to correctly read CSV files generated using OpenOffice software.

Previously, when reading a CSV file with the following content:

Example CSV

The old ReadCSV function would incorrectly return the list:

(("abc" "\"a" "b" "c\"" "\"\"\"abc\"\"\"" "\"\"\"a" "b" "c\"\"\""))

The updated function now correctly returns:

(("abc" "a,b,c" "\"abc\"" "\"a,b,c\""))

As a result of the updated Read CSV function noted above, I have subsequently updated my Update Titleblock Attributes program to Version 1.4 to allow for CSV files containing commas and quotes.

12th January 2012

I found a few minor bugs in the code for my recently added Get Files Dialog function pertaining to the behaviour of mode_tile statements for the Add Files and Remove Files buttons. These have now been fixed and the code has been updated to Version 1.1.

11th January 2012

Added Get Files Dialog function to the Subfunction Library. This function is analogous to the AutoLISP getfiled function, however allows the user to select multiple files from several directories.

9th January 2012

First post of 2012: a Happy New Year to my readers!

Added Read CSV function to the Subfunction Library. This function will read an Excel Comma Separated Value (CSV) file and return a matrix list of the cell values, that is, a list of lists where each sublist is a row of cell values.

30th December 2011

The code for my Unformat String function has been completely rewritten; the new version should be more robust with far more error trapping. The Unformat String function will remove all MText formatting codes from a supplied string.

29th December 2011

Updated Open function code and included an extra example demonstrating how the function may be used to open an arbitrary file selected by the user.

Reformatted the code for the Ortho Point function and included a 'Vector Calculus' version of the same function to demonstrate another approach.

27th December 2011

Revised the Update Titleblock Attributes program to Version 1.3. This version implements a modification to allow the program to correctly process CSV files generated using OpenOffice software.

24th December 2011  

Updated the Iterated Function Systems mathematical program to Version 1.2. This is a complete rewrite of the program, including an update to the Barnsley's Fern program on the main page.

23rd December 2011

Updated Fractal code to remove unnecessary expressions and hence improve performance.

21st December 2011

Updated the Dynamic Block Functions page and added a Contents section to ease navigation of the various functions.

17th December 2011

Added Polygon Centroid function to the Subfunction Library. This function will return the centroid (expressed relative to WCS) of an LWPolyline Polygon, that is, a non-self-intersecting closed LWPolyline consisting entirely of straight segments.

Also added PolyCentroid function to my set of Geometric Functions.

Updated Attribute Functions page to reformat all code and include new function: SetAttributeValues.

Added a Contents section to the Attribute Functions page.

7th December 2011

Added Get Anonymous References function to the Subfunction Library. This function will iterate over the block table and return a list of the names of all anonymous references associated with a supplied block name; armed with such a list, an appropriate ssget filter list may be constructed to include only those references which are relevant to a specific dynamic block.

2nd December 2011

Added 3-Point Circle & Arc Functions to the Subfunction Library. These functions return the data required to construct a Circle or Arc from three supplied points. A variety of non-dynamic and dynamic test programs are also included.

Added mid, 3PCircle & 3PArc to my set of Geometric Functions.

Added v1 function to my set of Matrix & Vector Functions. This function will return a unit vector representation of a supplied vector.

27th November 2011

Updated Reset XRef Layers program to Version 1.1. This version incorporates code to search the working directory and AutoCAD support directories for the XRef source file, should such file not be found at the filepath encoded in the XRef.

24th November 2011

Tweaked the style of the Programs page.

19th November 2011

Added Reset XRef Layers program to the General Programs section of the site. This program enables the user to reset all or specific layer properties of XRef dependent layers to match the properties present in the XRef source drawing file.

16th November 2011

Added Minimum Enclosing Circle program to the General Programs section of the site. This program offers two commands to allow the user to make a selection of one or more objects, then proceed to construct the unique minimum enclosing circle containing all objects in the selection.

A minor update to the Entity to Point List function to include Point Entities.

11th November 2011  

Added Minimum Enclosing Circle function to the Subfunction Library. This function will compute the centre & radius of the smallest circle containing a set of points.

9th November 2011

Added Entity to Point List function to the Subfunction Library. This function will return a list of points describing or approximating a supplied entity, whilst minimising the length of the returned point list where possible.

6th November 2011

Added Quick Field program to the site. This function is designed to enable the user to quickly and easily design & create custom programs for inserting multiple fields into a drawing. This could be for use in situations in which the user is required to create many fields in a drawing, with each field referencing the same object property, and continued use of the Field Command Dialog can become tedious.

5th November 2011

Added Get Field Objects function to the Subfunction Library. This function requires a single parameter: an entity containing a Field, and will return a list of entities referenced by the supplied Field.

3rd November 2011

Added Friends of Lee Mac Programming to the homepage sidebar. If you wish to become a friend of Lee Mac Programming and feel that your site has suitable content which is relevant to my site, feel free to contact me.

Whether or not your site is suitable to become an affiliate of Lee Mac Programming feel free to display my microbar on your site, I appreciate you linking to my site.

1st November 2011

Added to the Subfunction Library a function to compute the Convex Hull of a set of points. The Convex Hull is the set of points describing the minimum convex polygon enclosing all points in a given set. The function shown implements the Graham Scan algorithm to compute the Convex Hull - a description of this algorithm including a visual demonstration of the process is included on the program page.

In other news... Lee Mac Programming is a year old!

30th October 2011

Updated Area Label program to Version 1.9. This update fixes a bug causing the program to crash when Region Objects were selected.

29th October 2011

Tweaked the code for the Entity List utility. The program has now been renamed and more accreditation has been included to recognise the author of the program on which the utility is based.

Redesigned the site Contact Form.

24th October 2011

Added Testimonials section to the About page. This section includes a few paragraphs from companies who have hired my services, detailing their experiences working with me and my programs.

If you or your company wish to share your thoughts about my site, or working with me or my programs in the form of a testimonial, feel free to contact me.

23rd October 2011

Added Draw Grid program to the site. This program will prompt the user for a number of rows and columns then proceed to dynamically construct a grid composed of Line Entities between two corner points.

20th October 2011

Added Automatically Label Attributes program to the site. This program uses multiple reactors to automatically label / number a specific attribute in a set of blocks, automatically renumbering if blocks are added, copied or erased.

11th October 2011

Updated Incremental Numbering Suite to Version 3.1. This fixes a bug concerning a null variable when an Annotative Text Style is set and the Object type is set to use an Attributed Block.

10th October 2011

Incremental Numbering Suite Version 3.0 released.

The program is now faster & smoother and has become my largest and most developed application, with many new features and updates included in the new version, a handful of which I have listed below.

I have also completely rewritten the program description to give a more complete overview of the program capabilities.

  • Program completely rewritten to improve program performance, update code formatting to improve readability and include the following new features:
  • Ability to use Text, MText or an arbitrary Attributed Block to house incrementing string.
  • Ability to change Text / MText Alignment.
  • Ability to toggle the use of a Background Mask with MText.
  • Ability to specify and pick both dimensions for the fixed size Slot / Rectangular border.
  • Vastly improved alphabetical text incrementing.
  • Improved handling of negative numbers with decimals or leading zeros.
  • Dialog interface completely redesigned to make it more user-friendly and intuitive to navigate.
  • Immensely improved non-dynamic mode interface & functionality.
  • Program works in all UCS/Views correctly.

7th October 2011

Coming Soon!

Version 3.0 of my Incremental Numbering Suite program.

Following the popularity of this program on my site, I am currently working on a new version which promises to be smoother, faster and packed with new features.

Click here to read about some of the planned new features and see a preview of the new interface.

3rd October 2011

Added set of Text Case Functions to the Subfunction Library. These functions demonstrate how to convert a text string to various text cases and formats. Included are functions to enable conversion of a text string to Sentence Case, Title Case, or finally, the case of each character in a string may be switched using the Toggle Case function.

2nd October 2011

Copy to Drawing program completely rewritten and updated to Version 1.1. When rewriting this program I have significantly condensed the code, reformatted the code style to make the source code more readable and easier to follow, and hopefully improved the performance of the program.

30th September 2011

Updated Automatic Block Break program to Version 1.4. Included in this version is an option to enable or disable the automatic rotation of the block if a curve object is found at the block insertion point.

Added set of Assoc++ Functions to the Subfunction Library. These functions may be used to increment the associated value of a key in an association list, or a nested key as part of a hierarchy of keys in a nested association list. Such functions are useful when counting the number of occurrences of distinct items in a set, or when counting items which are dependent upon other items. These functions are used in many of my programs: Block Counter, Text Counter, Count Attribute Values & Dynamic Block Counter to name a few.

Updated Incremental Array program to Version 1.4. This version fixes a bug when arraying and incrementing attributes on locked layers.

28th September 2011

Added Clockwise-p and ListClockwise-p to my set of Geometric Functions. These functions may be utilised to determine whether 3 or more points are clockwise oriented, that is, whether a path passing through the points follows a clockwise direction.

24th September 2011

Implemented a facility to allow users to change the width of pages on the site, depending on their preference. Users may select a Fluid, Wide, Medium or Narrow width setting. The default width is Fluid in which the width of the page is set by the width of the browser. Other settings may be more suitable for various screen resolutions.

21st September 2011

Added Pad Between Strings function to the subfunction library. This function returns a string of a minimum specified length which is the concatenation of two supplied strings, padded between using a supplied character. Such a function is extremely useful when printing reports or lists to the command-line, and is used extensively in my Dynamic Block Counter program.

20th September 2011

Implemented a facility to allow users to alter the size of text on my site, increasing readability.

Added Custom Programming Services section to the Home page, for those companies looking to automate repetitive tasks in their procedures via the use of custom programming, potentially saving hours of valuable time.

11th September 2011

Added Dynamic Block Counter program to the site. Very similar to my Block Counter program, this program will count all blocks in the current layout of a drawing - be they standard, dynamic, or XRef; generating a report of the quantities at the command-line. Furthermore, for every dynamic block with a Visibility Parameter present, the number of blocks assuming every Visibility State of the dynamic block is detailed in the output report.

10th September 2011

Added Get Visibility Parameter Name, Get Visibility State, & Set Visibility State functions my set of Dynamic Block Functions. These functions allow the user to manipulate the Visibility Parameter of a Dynamic Block.

Updated SelectionSet Bounding Box function and test program to make the code more succinct and increase function performance.

7th September 2011

Updated Steal from Drawing program to Version 1.5. This version implements a number of changes to improve the program:

  • Added the ability to use Wildcard Patterns in the ItemList parameter to allow all items in a collection which match the supplied wildcard pattern to be imported.
  • Added Materials and Named Viewports to the list of collections.
  • Added StealAll command to allow the user to automatically steal everything from a selected drawing file.
  • Added StealTemplate command to enable the user to quickly steal items from the QNew template file (or other template file, if the QNew template file is not set).

5th September 2011

Updated Polyline Outline program to Version 1.1. This version includes a fix for a minor bug relating to incorrect processing of the ending width of the final polyline segment.

3rd September 2011

Added Polyline Outline program to the site. This program will create one or more LWPolylines along the boundary of a supplied LWPolyline with varying or constant width.

28th August 2011

Upgraded Update Titleblock Attributes program to Version 1.2. This version removes case-sensitivity from the 'Drawing Filename' column of the CSV Drawing Register so that both the drawing filename data (first column) and layout data (optional, second column) are not case-sensitive. I have furthermore added a GIF animation providing a succinct demonstration of how the program may be used to link a set of drawings to a drawing register.

25th August 2011

Updated Copy or Rename Block program to Version 1.3. This version allows the user to copy and rename External References (XRefs) in addition to Standard and Dynamic Blocks; retaining any XClips associated with the selected block.

24th August 2011

Added Incremental Array program to the site. This program will array a selection of objects, whilst incrementing any numerical content found in objects containing text within the selection.

19th August 2011

Added Elevation Marker program to the site. This relatively simple program allows the user to continuously place elevation markers composed of an LWPolyline and Text object at specific points in a drawing.

14th August 2011

Added Minimum Bounding Box function to the subfunction library. This function uses a brute-force method to determine the minimum rectangular bounding box framing all objects in a supplied selection set.

6th August 2011

Added Visual LISP IDE tutorial: A Shortcut to Localising Variables to help relieve the tedium of localising many variables in larger programs, reducing the task to a simple copy & paste operation.

5th August 2011

Updated Text Counter to Version 1.1. This program will count the number of occurrences of distinct text strings in a selection of objects. In addition to reformatting the code for this program, this updated version includes the ability to count MLeader text and Dimensions with a text override. Annotative text styles have also been taken into consideration when determining the size of the resultant table object.

3rd August 2011

Added Error Message Troubleshooter to the Tutorials page. This page provides a brief guide detailing the possible causes of a selection of common error messages received when executing an AutoLISP program.

Updated my Automatic Block Break program to Version 1.3. This update implements a complete change to the method used to detect intersections between the inserted block and surrounding objects, improving program performance. The new version of the program will now exclude attributes from the trimming operation, and will trim objects surrounding blocks whose insertion points do not lie on a curve object (in previous versions such objects were not trimmed). Finally, a new command: 'ABBS' (AutoBlockBreakSelection) has been added to allow users to make a selection of multiple blocks to be processed by the AutoBlockBreak subfunction.

27th July 2011

Added Edit Box subfunction to the site. This very simple function utilises a predefined AutoCAD dialog definition to display an interface allowing the user to input a text string.

22nd July 2011

It has been almost a year since I have worked on my Batch Find & Replace Text program, and considering its apparent popularity amongst the other programs on my site, I felt it was about time that I updated it.

The majority of the program code has hence been rewritten and reformatted in line with my other more recent programs, and the following enhancements have been incorporated:

  • Added 'Where to Search' panel to the Options dialog to enable users to restrict the Find & Replace operation to Model space, Layout space or both.
  • Added ability to perform the Find and Replace operation on objects within Block Definitions.
  • Added ability to process All Open Drawings.
  • Changed format of Saved Searches file for easier manual editing.
  • Added Current Directory toggle to directory selection panel to allow the user to quickly select the current working directory of drawings for processing.
  • Fixed tab stops in main dialog so that the user may navigate between the Find and Replace edit boxes more intuitively.
  • Incorporated ability to add items to the Find & Replace list by pressing Enter from within either edit box.
  • Added ability to press Enter after specifying Save Reference to avoid the need to click the OK button.
  • Added ability to press Enter from within either edit box of the Edit Entry dialog, to avoid the need to click the OK button.
  • General bug fixes and function improvements.

15th July 2011

Added String Wrap function to the site. This subfunction will break a supplied string at spaces (if possible) into a list of substrings, each of a specified length or less.

9th July 2011

Added set of Bulge Conversion Functions to the subfunction library. These functions demonstrate various methods to convert between the quantities used to define a Polyline Arc segment and those used to define an Arc Entity, with diagrammatic explanations of the calculations used in each method.

8th July 2011

Updated List Box Synchronisation tutorial to fix a few typos.

2nd July 2011

Added set of List Box Functions to the subfunction library. These functions may be used to manipulate the order of multiple items in a DCL List Box, as demonstrated by my TabSort program and Layer Draw Order program.

1st July 2011

Added Centered Measure program to the site. This program is designed to emulate the behaviour of the standard AutoCAD Measure command, however, the resultant measured intervals are centered on the selected object, as opposed to extending along the object from one end.

28th June 2011

Added SubList function to the subfunction library. This subfunction is the list equivalent of the AutoLISP substr function, and will return the sublist of a supplied list from a specified starting index and with a specified length.

Added List Collinear-p, Coplanar-p and List Coplanar-p predicate functions to set of Geometric Functions. These functions offer the ability to test the collinearity of a list of points, or the coplanarity of four or more points.

27th June 2011

Added Collinear-p and Perpendicular-p functions to set of Geometric Functions. These predicate functions may be used to test the collinearity of three points, or the perpendicularity of two vectors.

23rd June 2011

Updated Change Block Insertion program to Version 1.3. This version fixes a reported bug pertaining to the position of the selected block reference not being retained when nested in other blocks in the drawing. When called with 'CBIR', the program will now update the position of every reference of the selected block (nested to any level) in all block definitions.

20th June 2011

Updated Layer Draw Order program to Version 1.2. This version allows the user to select specific layers for which to change the draw-order from a filterable list of non-XRef dependent layers, whilst retaining the inherent draw-order of entities on the other remaining layers in the drawing. Furthermore, selected layers may be ordered above or below the other layers in the drawing. A Help button is also included to assist the user.

18th June 2011

Updated Layer Draw Order program to Version 1.1. This version increases the height of the layer list to ease use in drawings with a large number of layers. The updated program also offers the ability to add a wildcard pattern to the list of layers in order to group a set of layers matching the pattern.

16th June 2011

Added Layer Draw Order program to the site. Similar to the Express Tools' CDOrder program, this program enables the user to control the draw order of all entities on each layer in a drawing, relative to other layers.

13th June 2011

Added Parse Numbers function to the site. This function will extract numbers represented in decimal format from a supplied string, returning a list of all numerical values found in the string.

12th June 2011

Added both a Visual & Vanilla LISP version of an Effective Block Name function to the site. These subfunctions demonstrate methods to obtain the true name of a block reference as per its associated block definition in the block collection of the drawing in which it resides.

Tweaked ArcSine and ArcCosine functions as part of the set of Trigonometric Functions to make the code more readable.

11th June 2011

Added List Difference function to the site. This function will return a list expressing the difference or relative complement of two or more lists, that is, a list of items appearing exclusively in one list but not the other(s).

Added List Symmetric Difference function to the site. This subfunction will return a list expressing the symmetric difference of two or more lists, that is, a list of items appearing exclusively in each list and not in the intersection of any pair of lists.

10th June 2011

Added List Union and List Intersection functions to the subfunction library section of the site. These functions will return a list expressing the union and intersection, respectively, of two or more supplied lists.

Added Line-Circle Intersection function to set of Geometric Functions. This function will return the point(s) of intersection between a line and a circle.

9th June 2011

Added iterative versions of Subst Once, Subst Nth, Remove Once and Remove Nth subfunctions to the site.

8th June 2011

Added some extra functions to the Unique & Duplicate List Functions page. This page contains various functions engineered for manipulating lists in which items appear more than once.

7th June 2011

Added List Box subfunction to the subfunction library of the programs page. This subfunction displays a dialog with a List Box interface enabling the user to select one or more items from the supplied data set.

5th June 2011

Added Strikethrough Text program to the site. This program will create an LWPolyline passing through the centre of selected Text or MText objects to create a strikethrough text effect.

Updated set of Intersection Functions to include functions to return the intersection points between objects in a list, two sets, or two lists.

4th June 2011

Updated Circle Break program to Version 1.2 following a received bug report.

3rd June 2011

Added RGB->HSL and HSL->RGB conversion functions to set of Colour Conversion Functions. These functions will convert between Red, Green, & Blue colour values and Hue, Saturation & Luminance values for the two colour models.

2nd June 2011

Renamed Copy Block program to Copy or Rename Block since the program now provides the ability to copy or just rename a single selected block reference.

Updated Copy Block program once more to Version 1.2. I realised there was a much easier way to implement the transference of block properties from the source block to the copied block. This approach has consequently removed a lot of excess code from the previous version.

1st June 2011

Completely rewrote my Copy Block program, which has now been updated to Version 1.1. This program will allow the user to copy and rename a block (which may be dynamic) in the working drawing. The program uses an ObjectDBX Document as an intermediary in which the block definition can be copied and renamed without resulting in a duplicate key in the Block Collection of the working drawing.

Added 'Preview' GIF animation to Copy Block page demonstrating program usage on a dynamic block example.

Updated the Change Block Insertion program to Version 1.2. This program was written around the same time (if not earlier) as my recently updated Add Objects to Block program. Hence this update carries forward many of the changes applied to that program.

Updated ObjectDBX Wrapper program to reflect changes to Get All Files subfunction.

Updated Circle Break program to Version 1.1 to utilise upgraded Select If subfunction and new Clockwise-p subfunction.

31st May 2011

Updated the Add Objects to Block program to Version 1.1. I first wrote the code for this program in June of last year and have now implemented knowledge I have since gained to remove some excess code from the program to hopefully streamline the process. The AddObjectstoBlock subfunction has also been rewritten to require a VLA Document Object parameter, enabling the developer to utilise the subfunction on blocks in arbitrary documents (i.e. also through ObjectDBX).

Updated the Align Text program to Version 1.1. Once again, removing excess code to increase the performance of the program and to bring the coding style in line with my other programs.

30th May 2011

Added Popup subfunction to the site. This function uses the Popup method of the Windows Script Host Shell Object to display a customisable pop-up message box.

29th May 2011

Added Permutations function to subfunction library. This recursive subfunction will return a list of all possible permutations of elements in a supplied list.

Added Insert Nth function to subfunction library. This function will insert an item at the nth position in a list.

Added Remove Items function to the site. This function will remove items at specified indexes from a list.

28th May 2011

Added set of Geometric Functions to Mathematical functions page.

27th May 2011

Added 3D Reflection function (including test functions) to set of Matrix Transformation Functions. This function will reflect a target (VLA-Object or List of 3D Points) in an arbitrary plane.

26th May 2011

Added 3D Rotation function (including test functions) to set of Matrix Transformation Functions. This function will rotate a target (VLA-Object or List of 3D Points) by a given angle about an axis defined by two 3D points.

Renamed 'SubstN' program to Subst Nth to be consistent with similar Remove Nth program.

25th May 2011

Added set of Base Conversion functions to demonstrate methods of converting a number between numeral systems using different bases or radixes.

Updated Directory Dialog subfunction to incorporate better error trapping and a more concise and structured code layout.

Updated Get All Files subfunction to remove excess code and hence improve performance and readability.

Updated ACADDOC.lsp Creator program to Version 1.1 to incorporate the updated Get All Files and Directory Dialog subfunctions and other upgraded subfunctions used by the program.

Updated subfunctions enabling the user to Add & Remove Support Paths to make the code more concise and readable.

Added Remove Once subfunction to the site, a function which enables the developer to remove the first occurrence of an item from a list.

Added Apply to Block Objects subfunction to the site. This subfunction will evaluate a supplied function on all objects in a block definition and return a list of the return of each function evaluation.

24th May 2011

Tweaked site formatting to make table text on program pages more readable.

19th May 2011

Added Update Titleblock Attributes program to the site. This program offers the ability to automatically update drawing titleblock attributes with values sourced from a CSV drawing register. When a drawing is opened, a CSV Drawing Register may be automatically read by the program, and titleblock attributes are updated using values corresponding to the drawing entry in the register.

18th May 2011

Updated Select If subfunction to apply the optional predicate function to the entity selection list returned by the selection function, and also return this entity selection list; this provides the developer with the ability to use other elements in the selection list to validate the predicate function in addition to the selected entity name. An optional keyword argument (in the form of a list of parameters to be supplied to the initget function) is also included.

Added a selection of Clockwise-p subfunctions to determine whether three points are oriented clockwise; complete with brief explanations of the mathematical methods utilised by each function.

Added 'Jump To' quick navigation bar to sidepanel of site so that visitors can find what they need faster.

17th May 2011

Updated TabSort program to Version 2.2. This program was written back in late 2009 and so I figured it needed a little updating. In the end, I decided to rewrite the entire program. I haven't added any new functionality, but the program should be more robust and run smoother than the previous version, with a few bugs squashed in the process. The Find and Replace engine has been completely overhauled, now permitting the user to use self-referencing find and replace terms (for example, replacing 'ABC' with 'AB'), and the visual feedback during the find and replace process has been improved significantly. With the vast number of changes to the program, I expect there are still a few bugs lurking, but in my preliminary tests, I haven't found anything as yet.

15th May 2011

Added Object Lock program to the site - a purely academic piece of code demonstrating the ability to prevent modification of a set of objects using reactors.

14th May 2011

Added Associative Centerlines program to the site. This reactor based program enables the user to create associative circle centerlines which will automatically update following modification of the associated circle.

Updated the set of Attribute Functions to remove case-sensitivity from the attribute tag argument and also add a couple of recursive variations to the Vanilla subfunctions.

Updated the set of Dynamic Block Functions to remove case-sensitivity from the dynamic block property argument.

Fixed a bug found in the Area Label program (updated to Version 1.8).

12th May 2011

Added Area Label program to the site. This versatile program enables the user to annotate picked areas or selected objects with custom labels and either display the labels and associated areas in an AutoCAD Table Object, or write the data to file.

Added Steal from Drawing program to the site. This program allows the user to import (humourously: 'steal') items from another drawing into the current drawing. The user can choose to import multiple items from a list of Blocks, Layers, Linetypes, Dimension Styles, Text Styles, Table Styles, MLeader Styles, MLine Styles, Layouts, Page Setups, User Coordinate Systems, Views, Layer States & Scales.

8th May 2011

Updated the ObjectDBX Wrapper subfunction and associated test function.

7th May 2011

Added program to allow the user to dynamically align a selection of objects to a selected curve. The user is prompted to make a selection of objects to align to a selected curve, and a base point to use during alignment. The objects are then dynamically aligned to the curve in real-time, whilst the user may refine the alignment using additional controls offered at the command-line.

textsize

increase · reset · decrease

My Friends

  • CADTutor
  • AfraLISP
  • CAD Forum
  • CAD Notes
  • DotSoft
  • The CAD Setter Out
  • CAD LISP and Tips
  • KitoX
  • Talk about CAD
  • gileCAD
  • DuctiSoft
  • SourceCAD
  • Skill Amplifier
  • Canada CAD

Designed & Created by Lee Mac © 2010