|View HTML Version||DeleteBlocksV1-0.html|
This program enables the user to quickly remove multiple blocks from a drawing.
After invoking the program with the command delblocks at the AutoCAD command-line, the user is presented with a simple dialog interface consisting of a single list box. The dialog provides a list of all standard & dynamic blocks contained in the active drawing, excluding anonymous blocks and xrefs. From this list, the user may select multiple blocks to be deleted from the drawing.
Upon the user accepting the selection with the OK button, the program will delete all references of the selected blocks and will proceed to delete the respective block definitions, if possible.
The user will subsequently be informed at the command-line of those blocks successfully deleted by the program, and those that the program was unable to remove.
The program also contains the function LM:DeleteBlocks so that users who wish to remove multiple blocks from several drawings in a batch processing operation may bypass the dialog and call this function with a VLA Document Object and a list of block names (case-insensitive) from a Script or another LISP application. This function is also compatible with ObjectDBX, and hence may be utilised in conjunction with my ObjectDBX Wrapper function.
Instructions for Running
Please refer to How to Run an AutoLISP Program.