AutoCAD Platform Customization: User Interface and Beyond (2014)
Welcome to AutoCAD Platform Customization! Have you ever thought about customizing the Autodesk® AutoCAD® program only to think it is not for you because you’re not a programmer?
If so, you are not alone—many people connect customization with programming. However,
customization is not the same as programming, although programming can be considered a
form of customization.
While using one of the supported programming languages can be useful in implementing
custom workfl ows and new commands, simpler ways exist to increase your drafting effi ciency in a shorter period of time. AutoCAD supports a wide range of customization features that you can learn and begin to leverage in minutes, which can lead to improved CAD standards and a decrease in the amount of time it takes to complete a task.
I, like many others—even you, most likely—have customized AutoCAD without even real-
izing it. Have you ever created a new layer, text style, or block? Chances are pretty good that you have created one or more of those items before. You might have even stored those items in a drawing template (DWT) fi le so they would be available each time a new drawing was created.
While you might not have thought about these as forms of customization, they are indeed a few of the basic drawing customization features that can be used to enhance the out-of-the-box AutoCAD experience.
Drawing customization affects the appearance of and settings in a drawing fi le or drawing template fi le, and should form the cornerstone of your company’s CAD standards. Often when people think of customization, they think of application customization, which includes the support fi les that AutoCAD uses, as well as the tools in the application’s user interface. Application customization is not dependent on which drawing is currently open, but on which user profi le or workspace is current.
About This Book
AutoCAD Platform Customization: User Interface and Beyond provides you with an understanding of all the customization features to improve your productivity. This book is designed to introduce you not only to concepts related to defi ning CAD standards and customizing AutoCAD, but also to key customization concepts through procedural-based exercises.
This book is the fi rst book 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, and will be available as a printed book in late 2014.
Book 2 in the series, AutoCAD Platform Customization: AutoLISP, will be available in spring 2014; Book 3, AutoCAD Platform Customization: VBA, will be available in late 2014. These two books focus on the AutoLISP® and VBA programming languages, starting with the basics and working you toward advanced concepts.
Is This Book for You?
AutoCAD Platform Customization: User Interface and Beyond covers many of the customization features that can be found in AutoCAD on Windows and Mac. If any of the following are true, this book will be useful to you:
◆ You want to learn about which customization options are available in AutoCAD.
◆ You want to customize the user interface or support fi les, such as the linetypes and hatch patterns that AutoCAD utilizes.
◆ You want to automate repetitive tasks.
◆ You want to create and manage CAD standards for your company.
Customization in AutoCAD
Customization is one of the feature areas that sets AutoCAD apart from many other CAD
programs. Even though the product can be used out of the box, confi guring the user interface and modifying the support fi les that come with the product can greatly improve your productivity. By customizing AutoCAD, you can streamline product workfl ows and create new ones that are a better fi t with the way your company works. These workfl ows might range from importing layers and styles into a drawing to the extraction of drawing-based information into a spreadsheet or database.
Not all of the customization features require you to learn a new tool or skill set; chances are you might have customized AutoCAD and not even realized it. If you have ever created a layer or a block, you already understand some of the customization features of AutoCAD. AutoCAD
customization features can be grouped into three categories: basic, intermediate, and advanced.
The advanced features require you to know a programming language and an AutoCAD-specifi c application programming interface (API).
The following outlines many of the common customization and programming options
◆ Annotation styles (text, dimensions, multileaders, and tables)
◆ Plot styles
◆ Page setups
◆ Materials, visual styles, and render presets
◆ Drawing templates
◆ Command aliases
◆ User profi les (Windows only)
◆ Workspaces (Windows only)
◆ Desktop icon customization (Windows only)
◆ Tool palettes (Windows only)
◆ User interface (CUIx) and DIESEL
◆ Linetypes and hatch patterns
◆ Shapes and text styles
◆ Action macros (Windows only)
◆ Dynamic blocks (Windows only)
◆ Visual Basic for Applications (Windows only)
◆ ActiveX/COM (Windows only)
◆ Database connectivity (Windows only)
◆ Sheet Set Manager API (Windows only)
◆ CAD Standards plug-ins (Windows only)
◆ Transmittal API (Windows only)
◆ Managed .NET (Windows only)
What to Expect
This book is organized to help you learn the fundamentals of establishing CAD standards and then how to manage and implement those standards by customizing the AutoCAD program.
Additional resources and fi les containing the samples found throughout this book are available on the companion web page, www.sybex.com/go/autocadcustomization.
Chapter 1: Establishing the Foundation for Drawing Standards In this chapter, you’ll learn how to establish drawing standards. Drawing standards allow you to enforce consistency across multiple drawings. By enforcing a set of standards, you can easily share your drawings and make them look the same when plotting them.
Chapter 2: Working with Nongraphical Objects In this chapter, you’ll learn how nongraphical objects affect display and output of objects in a drawing. Nongraphical objects such as layers and text styles make it easy to update the look of all the objects that reference them.
Chapter 3: Building the Real World One Block at a Time In this chapter, you’ll learn how to create and manage blocks. Blocks allow you to create logical object groupings that can be used several times in the same drawing. For example, you could create a small assembly of parts and insert it more than once in a drawing. If the assembly changes, you just need to update the block, and all instances of that block are changed.
Chapter 4: Manipulating the Drawing Environment In this chapter, you’ll learn how to change the AutoCAD drawing environment. During startup, you can control several of the
settings that affect the AutoCAD program. These settings can affect the display of the user interface, behavior of tools in the drawing environment, and where AutoCAD looks for
support fi les.
Chapter 5: Customizing the AutoCAD User Interface for Windows In this chapter,
you’ll learn how to customize the elements and display of the AutoCAD user interface on
Windows. The Customize User Interface (CUI) Editor allows you to create and manage the
tools that are displayed by the AutoCAD user interface.
Chapter 6: Customizing the AutoCAD User Interface for Mac In this chapter, you’ll learn how to customize the elements and display of the AutoCAD user interface on Mac OS. The
Customize dialog box allows you to create and manage the tools displayed by the AutoCAD
Chapter 7: Creating Tools and Tool Palettes In this chapter, you’ll learn how to create and customize tool palettes in AutoCAD on Windows. Tool palettes allow you to create a visual set of tools that can be used to insert blocks, start commands, or even hatch a closed area.
Tool palettes are available on Windows only.
Chapter 8: Automating Repetitive Tasks In this chapter, you will learn how to create scripts and action macros to automate repetitive tasks. Script fi les and action macros allow you to combine multiple commands into simple logical sequences without needing to know a
programming language. Action macros are supported on Windows only.
Chapter 9: Defi ning Shapes, Linetypes, and Hatch Patterns In this chapter, you will learn how to create custom shapes, linetypes, and hatch patterns that you can use to control the way line work appears in a drawing. The AutoCAD install provides a limited number of
standard shapes, linetypes, and hatch patterns. You can extend the standard defi nitions by creating your own shapes, linetypes, and hatch patterns for use in your drawings.
Chapter 10: Using, Loading, and Managing Custom Files In this chapter, you will learn how to use, manage, and migrate custom fi les. After you have spent the time customizing
AutoCAD, all you have left to do is deploy and manage your fi les.
An online counterpart to this book, the companion website contains the sample fi les required to complete the exercises found in this book in addition to the sample code and project fi les used to demonstrate some of the programming concepts explained in this book. In addition to the sample fi les and code, the website also contains some additional resources that are not mentioned in this book. The companion website can be found at www.sybex.com/go/autocadcustomization.
This book assumes that you know the basics of your operating system—Windows or
Mac OS X—and AutoCAD 2009 or later. When appropriate, I specify when a feature does not
apply to a specifi c operating system or release of AutoCAD. Most of the images in this book were taken using AutoCAD 2014 in Windows 8 and Mac OS X 10.7.
Although this book was not written to cover AutoCAD LT®, much of the content does apply
to that software package.
Styles and Conventions of This Book
This book uses a number of styles and character formats—bold, italic, monotype face, all uppercase or lowercase letters, and others—to help you distinguish from the text you read, sample code you can try, text that you need to enter at the AutoCAD Command prompt, or the name of an object class or method in one of the programming languages.
As you read through this book, keep the following conventions in mind:
◆ User-interface selections are represented by one of the following methods:
◆ Click the Application button ➢ Options.
◆ On the ribbon, click the Manage tab ➢ Customization ➢ User Interface.
◆ On the menu bar, click the Tools menu ➢ Customize ➢ Interface.
◆ In the drawing window, right-click and click Options.
◆ Keyboard input is shown in bold (for example, type cui and press Enter).
◆ Prompts that are displayed at the AutoCAD Command prompt are displayed as mono-space font (for example, Specify a start point:).
◆ AutoCAD command and AutoLISP function names are displayed in all lowercase letters with a monospace font (for example, line or command).
◆ Example code and code statements that appear within a paragraph are displayed in mono-space font. Code samples might look like one of the following:
◆ (command "._circle" PAUSE 3)
◆ The MsgBox method can be used to display an error message to the user.