AutoCAD Platform Customization
Through detailed discussions and tutorials that include real-world examples, this book gives you the power to enhance your program's experience and output. Lee Ambrosius is a Principal Learning Content Developer at Autodesk for AutoCAD and AutoCAD LT products and has worked on end-user and API documentation for nine releases. He has presented customization and programming sessions at Autodesk University for a decade, and has authored and edited several AutoCAD-related books. Follow him on twitter at @leeambrosius.
AutoCAD Platform Customization
Welcome to AutoCAD Platform Customization: AutoLISP ! Have you ever thought to yourself, Why doesn't the Autodesk® AutoCAD® program include every feature I need? Why isn't it streamlined for the type of work I perform? If so, you are not alone. AutoCAD at its core is a drafting platform that can be shaped and molded to more efficiently complete the tasks you perform on a daily basis and to enhance your company's workflows with the use of programming. Take a deep breath. I did just mention programming, but programming isn't something to fear. At first, just the idea of programming makes many people want to run in the opposite direction - myself included. The productivity gains are what propelled me forward. Programming isn't all that different from anything else you've tried doing for the first time.
In many ways, learning to program is much like learning a foreign language. For many new to AutoLISP®, the starting place is often a basic understanding of syntax and the command function. The command function allows you to leverage your knowledge of AutoCAD commands by being able to pass specific values to a command or pausing a command for a value. After you are comfortable with the syntax of AutoLISP and the command function, you can begin to learn additional functions that allow for the development of more robust and complex programs.
About This Book
AutoCAD Platform Customization: AutoLISP provides you with an understanding of the AutoLISP programming language and how it can help improve your productivity. This book is designed to be more than just an introduction to AutoLISP - a resource that can be used time and again when developing AutoLISP programs. As you page through this book, you will notice that it contains sample code and exercises that are based on real-world solutions.
This book is the second in a series of three that focuses on customizing and programming AutoCAD. The three-book series as a whole is known as AutoCAD Platform Customization: User Interface, AutoLISP, VBA, and Beyond , which will be available as a printed book in late 2014/early 2015. Book 1 in the series, AutoCAD Platform Customization: User Interface and Beyond , was published in early 2014 and focused on CAD standards and general customization of AutoCAD; book 3, AutoCAD Platform Customization: VBA , will be available in fall/winter 2014 and covers the VBA programming platform inside AutoCAD.
Is This Book for You?
AutoCAD Platform Customization: AutoLISP covers many aspects of AutoLISP programming for AutoCAD on Windows and Mac OS. If any of the following are true, this book will be useful to you:
You want to develop and load custom programs using the AutoLISP programming language for use in the AutoCAD drawing environment.
You want to automate the creation and manipulation of drawing objects.
You want to automate repetitive tasks.
You want to help manage and enforce CAD standards for your company. AutoLISP in AutoCAD
AutoLISP is the most popular and is the original supported programming language for the AutoCAD program. The reason for its popularity with new (and even veteran) programmers is that it is a natural extension of the AutoCAD program. There is no additional software to purchase, and AutoLISP can leverage the commands that Autodesk and third-party developers expose at the Command prompt. For example, with a few simple lines of code you can set a layer as current and insert a title block with a specific insertion point, scale, and rotation. The block is then inserted on the layer you specified. To perform the same tasks manually, the end user would have to set a layer as current, choose the block they want to insert, and specify the properties of the block, which, in the case of a title b