
- English
- ePUB (mobile friendly)
- Available on iOS & Android
About this book
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.
Tools to learn more effectively

Saving Books

Keyword Search

Annotating Text

Listen to it instead
Information
Chapter 1
Quick Start for New AutoLISP Programmers
- For Windows users: AutodeskĀ® AutoCADĀ® 2006 or later and the Notepad program
- For Mac OS users: AutodeskĀ® AutoCADĀ® 2011 or later and the TextEdit program
NOTE
Although I mention AutoCAD 2006 or later, everything covered in this chapter should work without any problems going all the way back to AutoCADĀ® 2000 and even possibly earlier releases.
Working with AutoLISP Expressions
(] or an exclamation point (!). Follow those symbols with the functions you wish to execute and the arguments that provide data or further instruction.- Launch AutoCAD, if it is not already running.
- At the AutoCAD Command prompt, type
(and press Enter.AutoCAD responds with the prompt(_>, which is the program's way of letting you know that AutoLISP has taken control. - Press Esc to return to the standard AutoCAD Command prompt.
- At the AutoCAD Command prompt, type
(+ 3 2)and press Enter.The AutoLISP expression is evaluated and returns a value of 5, which is the result of adding 3 and 2 together. The+(plus sign) is the function of the AutoLISP expression;3and2are the arguments (in this case, data) that are passed to the function. The AutoLISP function you want to use must be the first item after the opening parenthesis. - Type
(* 3.5 2)and press Enter.The value 7.0 is returned as a result of multiplying 3.5 by 2. - Type
(setq rad (/ 0.375 2))and press Enter.The value 0.1875 is returned as a result of dividing 0.375 by 2, but the same value is also assigned to the user-defined variable named rad with thesetqfunction. AutoLISP expressions can be nested one inside of another, and they are evaluated from the innermost to the outermost expression. In this example, the expression(/ 0.375 2)is evaluated first and returns 0.1875. The next expression,(setq rad 0.1875), is evaluated and it also returns 0.1875. - Type
circleand press Enter.The AutoCADcirclecommand is started. - At the
Specify center point for circle or [3P/2P/Ttr (tan tan radius)]:prompt, type(list 0 5)and press Enter.The(list 0 5)expression returns a value of (0 5), which is a list of two values that presents the 2D coordinate of 0,5. The center of the circle is started at 0,5,0. - At the
Specify radius of circle or [Diameter]:prompt, type!radand press Enter.AutoLISP evaluates the rad user-defined variable and returns its value to be used for the circle's radius. The radius of the circle should be set to 0.18...
Table of contents
- Cover
- Title Page
- Copyright
- Publisher's Note
- Dedication
- Acknowledgments
- About the Author
- Introduction
- Chapter 1: Quick Start for New AutoLISP Programmers
- Chapter 2: Understanding AutoLISP
- Chapter 3: Calculating and Working with Values
- Chapter 4: Working with Lists
- Chapter 5: Requesting Input and Using Conditional and Looping Expressions
- Chapter 6: Creating and Modifying Graphical Objects
- Chapter 7: Creating and Modifying Nongraphical Objects
- Chapter 8: Working with the Operating System and External Files
- Chapter 9: Catching and Handling Errors
- Chapter 10: Authoring, Managing, and Loading AutoLISP Programs
- Chapter 11: Using the Visual LISP Editor (Windows only)
- Chapter 12: Working with ActiveX/COM Libraries (Windows only)
- Chapter 13: Implementing Dialog Boxes (Windows only)
- End User License Agreement
Frequently asked questions
- Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
- Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app