AutoCAD Platform Customization - Lee Ambrosius - E-Book

AutoCAD Platform Customization E-Book

Lee Ambrosius

0,0
16,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

Make AutoCAD your own with powerful personalization options Options for AutoCAD customization are typically the domain ofadministrators, but savvy users can perform their owncustomizations to personalize AutoCAD. Until recently, most usersnever thought to customize the AutoCAD platform to meet theirspecific needs, instead leaving it to administrators. If you are anAutoCAD user who wants to ramp up personalization options in yourfavorite software, AutoCAD Platform Customization: UserInterface and Beyond is the perfect resource for you. AuthorLee Ambrosius is recognized as a leader in AutoCAD platformcustomization and can help you get the most out of AutoCAD. * Establish and manage CAD standards for the drawings youcreate * Control the startup process and settings that define thedrawing environment * Modify the user interface to display the commands you use mostfrequently and create new commands * Create macros to speed up frequently repeated tasks * Define custom shapes, linetypes, and hatch patters to controlthe linework in a drawing * Use real-world tips and tutorials to reinforce the author'stopical discussions A perfect resource for CAD administrators, students, seniordrafters, and other CAD enthusiasts, AutoCAD PlatformCustomization: User Interface and Beyond features in-depthdiscussions of customization options as well as detailed examplesand tutorials. As an eight-year customization and programmingsession leader with Autodesk University, Lee Ambrosius is uniquelyqualified to help users get the most out of software based on theAutoCAD platform. His AutoCAD Platform Customization: UserInterface and Beyond is the go-to resource for those who areready to take their software customization to the next level.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 473

Veröffentlichungsjahr: 2014

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Title Page

Copyright

Publisher’s Note

Dedication

Acknowledgments

About the Author

Introduction

About This Book

Is This Book for You?

Customization in AutoCAD

What to Expect

Other Information

Styles and Conventions of This Book

Contacting the Author

Chapter 1: Establishing the Foundation for Drawing Standards

Naming Standards for Projects and Files

Managing Standards with Drawing Templates

Choosing a File Format for Your Drawings

Defining Plotter Configurations and Plot Styles

Enforcing CAD Standards

Chapter 2: Working with Nongraphical Objects

Standardizing the Names of Nongraphical Objects

Managing Object Properties with Layers

Creating and Managing Annotation Styles

Defining and Managing Other Nongraphical Objects

Removing Unused Nongraphical Objects

Chapter 3: Building the Real World One Block at a Time

Defining and Editing a Block Definition

Using and Managing Block Definitions

Embedding Information in a Block Definition with Attributes

Adding Dynamic Properties to a Block Definition

Extracting Properties and Values from a Block Reference

Chapter 4: Manipulating the Drawing Environment

Getting Started with Drawing-Environment Customization

Customizing the AutoCAD Startup Process

Specifying Application Preferences

Customizing the Elements in the Drawing Window

Configuring Command and Dynamic Input

Creating and Modifying Command Aliases

Working with System and Environment Variables

Chapter 5: Customizing the AutoCAD User Interface for Windows

Getting Started with the CUI Editor

Creating Commands and Defining Command Macros

Customizing User-Interface Elements

Setting Up Rollover Tooltips and the Quick Properties Palette

Organizing the User Interface with Workspaces

Working with Customization Files

Controlling the Tools on the Status Bars

Chapter 6: Customizing the AutoCAD User Interface for Mac

Getting Started with the Customize Dialog Box

Creating Commands and Defining Command Macros

Customizing User-Interface Elements

Controlling the Tools on the Status Bar

Chapter 7: Creating Tools and Tool Palettes

What Is a Tool Palette?

Using the Tool Palettes Window

Defining Tool Palettes

Adding and Modifying Tools

Organizing Tool Palettes with Tool-Palette Groups

Sharing Tool Palettes and Tool-Palette Groups

Chapter 8: Automating Repetitive Tasks

Creating and Running Scripts

Recording Action Macros (Windows Only)

Chapter 9: Defining Shapes, Linetypes, and Hatch Patterns

Creating and Compiling Shapes

Creating and Using Custom Linetypes

Creating and Applying Custom Hatch Patterns

Chapter 10: Using, Loading, and Managing Custom Files

Deploying Your Custom Files

Using and Loading Custom Programs

Backing Up and Migrating Customization

Senior Acquisitions Editor: Willem Knibbe

Development Editor: Mary Ellen Schutz

Technical Editor: Rebecca Afshar

Production Editor: Dassi Zeidel

Copy Editor: Liz Welch

Editorial Manager: Pete Gaughan

Vice President and Executive Group Publisher: Richard Swadley

Associate Publisher: Chris Webb

Book Designers: Maureen Forys, Happenstance Type-O-Rama; Judy Fung

Proofreader: Candace Cunningham

Indexer: Ted Laux

Project Coordinator, Cover: Todd Klemme

Cover Designer: Michael E. Trent/Wiley

Cover Image: © Smileyjoanne/iStockphoto.com

Copyright © 2014 by John Wiley & Sons, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-1-118-90046-8 (ebk)

ISBN: 978-1-118-90695-8 (ebk)

No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifi cally disclaim all warranties, including without limitation warranties of fi tness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Web site is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites listed in this work may have changed or disappeared between when this work was written and when it is read.

For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (877) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.

Wiley publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com. For more information about Wiley products, visit www.wiley.com.

TRADEMARKS: Wiley and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affi liates, in the United States and other countries, and may not be used without written permission. AutoCAD is a registered trademark of Autodesk, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.

Dear Reader,

Thank you for choosing AutoCAD Platform Customization: User Interface and Beyond. This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching.

Sybex was founded in 1976. More than 30 years later, we're still committed to producing consistently exceptional books. With each of our titles, we're working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best books available.

I hope you see all that reflected in these pages. I'd be very interested to hear your comments and get your feedback on how we're doing. Feel free to let me know what you think about this or any other Sybex book by sending me an email at [email protected]. If you think you've found a technical error in this book, please visit http://sybex.custhelp.com. Customer feedback is critical to our efforts at Sybex.

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.

Acknowledgments

I have to give a very special thanks to all the great folks at Sybex for working on and helping to get this project off the ground after a few years of talking about it, especially Willem Knibbe. The next two people I would like to thank are Mary Ellen Schutz and Dassi Zeidel, the developmental and production editors on this book; you two made sure I stayed on track and delivered a 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. Last but not least, I would like to thank Rebecca Afshar, the technical editor on this book. Being a technical editor is never the easiest job, but it is one of the most important and I appreciate what you have done 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 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 and 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 made 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 utilize 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 for his own company named HyperPics, LLC. After he spent two 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 customization and end-user documentation. Recently, he has been working on the AutoLISP, VBA, ObjectARX, .NET, and JavaScriptprogramming documentation.

In addition to working on the AutoCAD documentation, Lee has been involved with the 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 books on different editions as a technical writer or author. He has also written white papers on customization for Autodesk and a variety of articles for AUGIWorld, published by AUGI®, on customization and programming.

Introduction

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 workflows and new commands, simpler ways exist to increase your drafting efficiency 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 realizing 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) file 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 file or drawing template file, 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 files 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 profile 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 defining CAD standards and customizing AutoCAD, but also to key customization concepts through procedural-based exercises.

This book is the first 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 files, 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, configuring the user interface and modifying the support files that come with the product can greatly improve your productivity. By customizing AutoCAD, you can streamline product workflows and create new ones that are a better fit with the way your company works. These workflows 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-specific application programming interface (API).

The following outlines many of the common customization and programming options available:

Basic

Layers

Annotation styles (text, dimensions, multileaders, and tables)

Layouts

Blocks

Plot styles

Plotters

Page setups

Materials, visual styles, and render presets

Drawing templates

Command aliases

User profiles (Windows only)

Workspaces (Windows only)

Desktop icon customization (Windows only)

Tool palettes (Windows only)

Intermediate

Scripts

User interface (CUIx) and DIESEL

Linetypes and hatch patterns

Shapes and text styles

Action macros (Windows only)

Dynamic blocks (Windows only)

Advanced

AutoLISP

ObjectARX

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)

JavaScript (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 files 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 files.

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 user interface.

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 files 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: Defining 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 definitions 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 files. After you have spent the time customizing AutoCAD, all you have left to do is deploy and manage your files.

Companion Website

An online counterpart to this book, the companion website contains the sample files required to complete the exercises found in this book in addition to the sample code and project files used to demonstrate some of the programming concepts explained in this book. In addition to the sample files 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.

Other Information

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 specific 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 monospace 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 monospace 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.

Contacting the Author

I hope you enjoy AutoCAD Platform Customization and it changes the way you think about completing your day-to-day work. If you have any feedback or ideas that could improve this book, you can contact me using the following address:

Lee Ambrosius: [email protected]

On my blog and website you'll find additional articles on customization and samples that I have written over the years. You'll find these resources here:

Beyond the UI: hyperpics.blogs.com
HyperPics: www.hyperpics.com

If you encounter any problems with this publication, please report them to the publisher. Visit the book's website, www.sybex.com/go/autocadcustomization, and click the Errata link to open a form and submit the problem you found.

Chapter 1

Establishing the Foundation for Drawing Standards

Drawing standards, also known as CAD standards, are guidelines that help you name the files that are created inside or outside of the Autodesk® AutoCAD® software for a project, the named objects that are used within a drawing file, and the file formats that you might accept. Much like the marketing or management teams use the same logos and memo templates, all drafters or professionals using AutoCAD software in your company should follow a set of company standards.

Without having a well-defined set of standards, you will find it harder to share and output files within a company, and in turn this can lead to delays and make it nearly impossible to achieve a consistent look to all the drawings that your client receives. In addition, it is difficult to customize AutoCAD to help enforce your company's standards if there really are no standards.

Can you imagine what a client might think when a company sends them a set of drawings that contain different fonts or title blocks, or the inconsistent use of lineweights?

Well-established drawing standards ensure that your drawings all look the same when they are presented to the client, and they can make it easier to

Train new drafters and other professionals on your company's standards that use AutoCAD

Identify which drawing and externally referenced files are associated with a project

Determine the purpose of a named object in a drawing

Share project files with clients and contractors because your standards are well defined

Naming Standards for Projects and Files

As you might have gathered, it is not in your company's best interest to let everyone define their own drafting standards; this same approach applies to naming standards for projects or the files associated with a project, and how files should be stored. At the end of the day, the files created are owned by the company, and there is a pretty good chance that more than one individual will be working on a project over its entire lifetime. There is nothing more frustrating than when changes to a project are requested and the files can't be located because they are missing or no one understands how the files were saved.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!