By Dennis Collin
Recently I posted about how users could make their multileader annotations smarter by using a Lisp routine to tag a block like a window or other component and get the leader to report the block name. This was achieved with a simple lisp routine that can be added to AutoCAD’s standard toolset.
Blocks have other properties besides names and attributes, which can be scheduled with AutoCAD’s data extraction tool. When blocks are defined, they have a description field parameter which can also be extracted to a multileader element using Lisp.
An AutoLISP routine is just a simple text file which can be created within Notepad or another similar App by entering the following code as shown in the image below.
Save the file as BDescriptionlabel.LSP. (or similar) in a suitable resource folder.
Add the lisp routine to AutoCAD’s startup suite using the Appload command.
An overview of the APPLOAD function for AutoCAD/LT can be found here.
Once loaded, type in the command ‘BDL’, select a block entity and then position the multileader annotation in a suitable location.
The routine uses the current multi-leader style and will adopt any defined settings including Annotative behaviour.
There is no link between the leader and the name of the block, should the block name change or be deleted the routine would need to be re-run to show the new information.
Lisp routines can be used for all kinds of tasks, saving users time and improving efficiency and productivity.
For some other examples of AutoLisp usage see some examples below.
Hozzászólások (0 hozzászólás)