NP CAD Page | Articles | Russian

On programming access to dynamic blocks from AutoLISP

On December 8, 2016 the author of Mysteries of Autodesk's Caves passed away. See article on Andrey Lazebny at

Link to J.Bergmark's blog with this theme

Dynamic blocks appeared for the first time in AutoCAD version 2006, that declared beginning of parametrization in this popular graphical product. Unlike static blocks existing before the dynamic blocks have possibilities for including parameters (coordinates, lengths, angles, etc.) to be impacted by actions (move, stretch, rotate, etc.). As a result of impact the block's appearance can suffer significant changes.
Visibility parameters provide opportunity of combinig several views in a block (e.g. three projections of a product). One tool more - lookup tables - enable saving all the possible dimensions of an object (e.g. all the dimensions of one beam).
That's why dynamic blocks attracted attention of AutoCAD users who did not constrain themselves by basic drafting instruments. Those users wish to build such objects to be easily transformed. Readers can find sample dynamic blocks in the Tool Palettes modeless window with panels for architectural, civil, and other blocks (symbols). See the book "AutoCAD 2006/2007. New Facilities". Pay attention that raster previews of dynamic blocks have a yellow icon on them: .

Of course this remarkable tool was noticed by programmers and CAD managers. But internal organization of dynamic blocks is so complicated and its description is so poor that it became a barrier for many researchers. For many but not for all. Andrey Lazebny is a Moscow programmer and is one of the diggers of AutoCAD depths who tried working with AutoLISP language to catch the sense. He published his conclusions on the forum and then designed as a story being shown here. The story is titled Mysteries of Autodesk's Caves and is written in a lively joke manner. It is divided into 11 parts:

Example of a simple dynamic block created in version 2007 and used in the story can be downloaded here.
You can find texts of AutoLISP programs here:

And you can see there a dynamic block having multiple visibility parameters. The block was created with the programs mentioned.

I invite all the comers to take a closer look at this material and to try extending it. Besides information on dynamic blocks the reader will see methods of communication with the AutoCAD object model using ActiveX technology.

You may write to the author by email ( ), changing # to a necessary symbol and putting AutoLISP & AutoCAD in the message topic.

N.Poleshchuk (introduction and translation)

NP CAD Page | Articles | Russian