AutoCAD Platform Customization

Book description

Customize and personalize programs built on the AutoCAD platform

AutoLISP is the key to unlocking the secrets of a more streamlined experience using industry leading software programs like AutoCAD, Civil 3D, Plant 3D, and more.

AutoCAD Platform Customization: AutoLISP provides real-world examples that show you how to do everything from modifying graphical objects and reading and setting system variables to communicating with external programs. It also features a resources appendix and downloadable datasets and customization examples—tools that ensure swift and easy adoption.

  • Find out how to remove unused buttons from the ribbon to gain screen space
  • Discover how to create macros for frequently performed actions, or add your company's logo to the bottom of every drawing
  • Learn to perform more involved customizations, like communicating with a database to validate and update information entered in drawing layers
  • Ideal for CAD administrators, senior drafters, savvy users, and other professionals and students

Through detailed discussions and tutorials that include real-world examples, this book gives you the power to enhance your program's experience and output.

Table of contents

  1. Title Page
  2. Copyright
  3. Publisher's Note
  4. Dedication
  5. Acknowledgments
  6. About the Author
  7. Introduction
    1. About This Book
    2. Is This Book for You?
    3. AutoLISP in AutoCAD
    4. What to Expect
    5. Other Information
    6. Styles and Conventions of This Book
    7. Contacting the Author
  8. Chapter 1: Quick Start for New AutoLISP Programmers
    1. Working with AutoLISP Expressions
    2. Storing and Loading AutoLISP Expressions
  9. Chapter 2: Understanding AutoLISP
    1. Getting Started with AutoLISP
    2. Storing and Retrieving Values
    3. Exploring Data Types
    4. Leveraging AutoCAD and Third-Party Commands
    5. Defining and Using Custom Functions
    6. Example: Drawing a Rectangle
  10. Chapter 3: Calculating and Working with Values
    1. Calculating Values with Math Functions
    2. Manipulating Strings
    3. Converting Data Types
    4. Returning a Value from a Custom Function
    5. Exercise: Drawing a Rectangle (Revisited)
  11. Chapter 4: Working with Lists
    1. What Are Lists?
    2. Creating a List
    3. Getting an Element from a List
    4. Appending, Substituting, and Removing Elements
    5. Determining Whether an Item Exists in a List
    6. Sorting the Elements of a List
    7. Using Point Lists to Calculate Geometric Values
    8. Converting Lists to Strings and Strings to Lists
    9. Exercise: Adding Holes to the Plate
  12. Chapter 5: Requesting Input and Using Conditional and Looping Expressions
    1. Interacting with the User
    2. Conditionalizing and Branching Expressions
    3. Repeating and Looping Expressions
    4. Exercise: Getting Input from the User to Draw the Plate
  13. Chapter 6: Creating and Modifying Graphical Objects
    1. Working with Entity Names and Dotted Pairs
    2. Adding Objects to a Drawing
    3. Selecting Objects
    4. Modifying Objects
    5. Working with Complex Objects
    6. Extending an Object's Information
    7. Exercise: Creating, Querying, and Modifying Objects
  14. Chapter 7: Creating and Modifying Nongraphical Objects
    1. Working with Symbol Tables
    2. Working with Dictionaries
    3. Exercise: Creating and Incrementing Room Labels
  15. Chapter 8: Working with the Operating System and External Files
    1. Storing Information in the Windows Registry or a Plist File
    2. Accessing Data from External Files
    3. Working with Directories and Files in the Operating System
    4. Exercise: Reading and Writing Data
  16. Chapter 9: Catching and Handling Errors
    1. Identifying and Tracking Down Errors
    2. Catching Errors in a Program
    3. Defining and Using a Custom Error Handler
    4. Grouping Functions into a Single Undo Action
    5. Exercise: Handling Errors in the drawplate Function
  17. Chapter 10: Authoring, Managing, and Loading AutoLISP Programs
    1. Storing AutoLISP Expressions
    2. Writing Modular Code
    3. Adding Comments
    4. Undefining and Redefining Standard AutoCAD Commands
    5. Defining a Startup Function
    6. Loading AutoLISP Files
    7. Managing the Locations of AutoLISP Files
    8. Deploying AutoLISP Files
    9. Exercise: Deploying the drawplate Function
  18. Chapter 11: Using the Visual LISP Editor (Windows only)
    1. Accessing the Visual LISP Editor
    2. Managing AutoLISP Files with the Visual LISP Editor
    3. Formatting an AutoLISP File
    4. Validating and Debugging Code
    5. Creating a Visual LISP Project
    6. Compiling LSP and PRJ Files into a VLX File
    7. Exercise: Working with the Visual LISP Editor
  19. Chapter 12: Working with ActiveX/COM Libraries (Windows only)
    1. Understanding the Basics of ActiveX
    2. Importing COM Libraries
    3. Using the AutoCAD COM Library
    4. Leveraging the Windows and Microsoft Office COM Libraries
  20. Chapter 13: Implementing Dialog Boxes (Windows only)
    1. What Is Dialog Control Language?
    2. Defining and Laying Out a Dialog Box
    3. Loading and Displaying a Dialog Box
    4. Interacting with and Responding to a User
    5. Exercise: Implementing a Dialog Box for the drawplate Function
  21. End User License Agreement

Product information

  • Title: AutoCAD Platform Customization
  • Author(s): Lee Ambrosius
  • Release date: October 2015
  • Publisher(s): Sybex
  • ISBN: 9781118798812