AutoCAD® Platform Customization

User Interface, AutoLISP®, VBA, and Beyond

Lee Ambrosius

 

 

 

To my wife, who is also my best friend: It is hard to imagine that I would be writing this book if it were not for you. It was you, all those years ago, who encouraged me to step outside of my comfort zone and share what I knew with others. Thank you for the push I needed and for coming along on this journey with me.

To my friend K athy Enderby: You were one of the fi rst people to encourage me to follow my passion for programming and sharing what I had learned with others. Thank you for believing in me all those years ago and for being there when I needed someone to bounce ideas off—especially during those late-night scrambles right before deploying a new software release.

Acknowledgments

I have to give a very special thanks to all the great folks at Sybex, especially Willem Knibbe, for working on and helping to get this project off the ground after a few years of talking about it. The next two people I would like to thank are Mary Ellen Schutz and Dassi Zeidel, the development and production editors on this book; you two made sure I stayed on track and delivered a high-quality book. I also want to thank Liz Welch (copyeditor), Candace Cunningham (proofreader), and Ted Laux (indexer) for the work you all did on this book.

Thanks to all the folks at Autodesk, who put in the long hours and are dedicated to the work they do on the Autodesk® AutoCAD® product. I cannot forget some of the most important individuals on this book, my technical editors: Rebecca Afshar, Craig Black, and Richard Lawrence. Rebecca Afshar performed the technical edit for Part I, “AutoCAD Platform Customization: User Interface and Beyond.” Rebecca has spent many years as both an instructor and user of AutoCAD; all of this experience helped to make this book even better.

Craig Black performed the technical edit for Part II, “AutoCAD Platform Customization: AutoLISP. ” I have known Craig for nearly 20 years and first met him while attending an AutoLISP® session at the local Autodesk Training Center, where he was an instructor. Craig is a excellent AutoLISP programmer and was a great asset as a technical editor on this book. It is always a pleasure to collaborate with Craig and this book was no different.

Last but not least, Richard Lawrence performed the technical edit for Part III, “AutoCAD Platform Customization: VBA.” Richard is a great friend who I met many years ago at Autodesk University. He is a passionate and driven user of AutoCAD and is always looking to improve the way he uses AutoCAD.

Being a technical editor is never the easiest job, but it is one of the most important and I appreciate what you all did to make this book better.

About the Author

Lee Ambrosius first started working with AutoCAD R12 for DOS in 1994. As a drafter, he quickly discovered that every project included lots of repetition. Lee, not being one to just settle for “this is just the way things are,” set out on a path that would redefine his career. This new path would lead him into the wondrous world of customization and programming—which you might catch him referring to as “the rabbit hole.”

In 1996, Lee began learning the core concepts of customizing the AutoCAD user interface and AutoLISP. The introduction of VBA in AutoCAD R14 would once again redefine how Lee approached programming solutions for AutoCAD. VBA made it much easier to communicate with external databases and other applications that supported VBA. It transformed the way information could be moved between project management and manufacturing systems.

Not being content with VBA, in 1999 Lee attended his first Autodesk University and began to learn ObjectARX®. Autodesk University had a lasting impression on him. In 2001, he started helping as a lab assistant. He began presenting on customizing and programming AutoCAD at the event in 2004. Along the way he learned how to use the AutoCAD Managed.NET API.

In 2005, Lee decided cubicle life was no longer for him, so he ventured off into the CAD industry as an independent consultant and programmer with his own company, HyperPics, LLC. After he spent a couple of years as a consultant, Autodesk invited him to work on the AutoCAD team; he has been on the AutoCAD team since 2007. For most of his career at Autodesk, Lee has worked primarily on the customization and end-user documentation. Recently, he has been working on the AutoLISP, VBA, ObjectARX,.NET, and JavaScript programming documentation.

In addition to working on documentation, Lee has been involved as a technical editor or author for various editions of AutoCAD and AutoCAD LT Bible, AutoCAD for Dummies, AutoCAD & AutoCAD LT All-in-One Desk Reference for Dummies, AutoCAD 3D Modeling Workbook for Dummies, and Mastering AutoCAD for Mac. He has also written white papers on customization for Autodesk and a variety of articles on customization and programming for AUGIWorld, published by AUGI®.