Welcome to Lee Mac Programming
Custom Programming Services
Want to harness the power of custom programming to save your company countless hours of repetitive work?
If there is a specific task that you wish to automate using custom programming, feel free to contact me to hire my services.
Want to know what you're missing out on? Read the testimonials of those who have worked with me and my programs.
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 Application Programming Interfaces (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 AutoCAD Mechanical and AutoCAD Architecture. AutoLISP is restricted to full versions of AutoCAD and cannot be run in versions of AutoCAD LT without the use of an extender. Other applications such as Bricscad and IntelliCAD also have the ability to run AutoLISP programs.
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 uses the ActiveX/COM interop 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
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:

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.
