Customization Guide
Total Page:16
File Type:pdf, Size:1020Kb
AutoCAD 2013 Customization Guide January 2012 © 2012 Autodesk, Inc. All Rights Reserved. Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose. Certain materials included in this publication are reprinted with the permission of the copyright holder. Trademarks The following are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and other countries: 123D, 3ds Max, Algor, Alias, Alias (swirl design/logo), AliasStudio, ATC, AUGI, AutoCAD, AutoCAD Learning Assistance, AutoCAD LT, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk, Autodesk Homestyler, Autodesk Intent, Autodesk Inventor, Autodesk MapGuide, Autodesk Streamline, AutoLISP, AutoSketch, AutoSnap, AutoTrack, Backburner, Backdraft, Beast, Beast (design/logo) Built with ObjectARX (design/logo), Burn, Buzzsaw, CAiCE, CFdesign, Civil 3D, Cleaner, Cleaner Central, ClearScale, Colour Warper, Combustion, Communication Specification, Constructware, Content Explorer, Creative Bridge, Dancing Baby (image), DesignCenter, Design Doctor, Designer's Toolkit, DesignKids, DesignProf, DesignServer, DesignStudio, Design Web Format, Discreet, DWF, DWG, DWG (design/logo), DWG Extreme, DWG TrueConvert, DWG TrueView, DWFX, DXF, Ecotect, Evolver, Exposure, Extending the Design Team, Face Robot, FBX, Fempro, Fire, Flame, Flare, Flint, FMDesktop, Freewheel, GDX Driver, Green Building Studio, Heads-up Design, Heidi, Homestyler, HumanIK, IDEA Server, i-drop, Illuminate Labs AB (design/logo), ImageModeler, iMOUT, Incinerator, Inferno, Instructables, Instructables (stylized robot design/logo),Inventor, Inventor LT, Kynapse, Kynogon, LandXplorer, LiquidLight, LiquidLight (design/logo), Lustre, MatchMover, Maya, Mechanical Desktop, Moldflow, Moldflow Plastics Advisers, Moldflow Plastics Insight, Moldflow Plastics Xpert, Moondust, MotionBuilder, Movimento, MPA, MPA (design/logo), MPI, MPI (design/logo), MPX, MPX (design/logo), Mudbox, Multi-Master Editing, Navisworks, ObjectARX, ObjectDBX, Opticore, Pipeplus, Pixlr, Pixlr-o-matic, PolarSnap, PortfolioWall, Powered with Autodesk Technology, Productstream, ProMaterials, RasterDWG, RealDWG, Real-time Roto, Recognize, Render Queue, Retimer, Reveal, Revit, RiverCAD, Robot, Scaleform, Scaleform GFx, Showcase, Show Me, ShowMotion, SketchBook, Smoke, Softimage, Softimage|XSI (design/logo), Sparks, SteeringWheels, Stitcher, Stone, StormNET, Tinkerbox, ToolClip, Topobase, Toxik, TrustedDWG, U-Vis, ViewCube, Visual, Visual LISP, Voice Reality, Volo, Vtour, WaterNetworks, Wire, Wiretap, WiretapCentral, XSI. All other brand names, product names or trademarks belong to their respective holders. Disclaimer THIS PUBLICATION AND THE INFORMATION CONTAINED HEREIN IS MADE AVAILABLE BY AUTODESK, INC. "AS IS." AUTODESK, INC. DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE REGARDING THESE MATERIALS. Contents Chapter 1 Basic Customization . 1 Overview of Customization . 1 Organize Program and Support Files . 3 Overview of File Organization . 3 Multiple Drawing Folders . 5 Locate Customized Files . 7 Locate Plot Style Files . 8 Locate Plotter Files . 8 Locate Support Files . 9 Locate Drawing Template Files . 12 Locate Texture Files . 13 Create Command Aliases . 14 Create Command Aliases . 15 Chapter 2 Custom Linetypes . 17 Overview of Linetype Definitions . 17 Simple Custom Linetypes . 18 Simple Custom Linetypes . 20 Text in Custom Linetypes . 21 Text in Custom Linetypes . 23 Shapes in Custom Linetypes . 24 Chapter 3 Custom Hatch Patterns . 27 iii Overview of Hatch Pattern Definitions . 27 Overview of Hatch Pattern Definitions . 29 Hatch Patterns with Dashed Lines . 29 Hatch Patterns with Dashed Lines . 31 Hatch Patterns with Multiple Lines . 31 Hatch Patterns with Multiple Lines . 33 Chapter 4 User Interface Customization . 35 Understand User Interface Customization . 35 Overview of the Customization . 35 Customization Glossary . 36 Customize Commands . 36 Overview of Commands . 36 Create, Edit, and Reuse Commands . 37 Create, Edit, and Reuse Commands . 38 Create Macros . 40 Overview of Macros . 40 Use Special Control Characters in Macros . 42 Pause for User Input in Macros . 44 Provide International Support in Macros . 46 Use Built-in Commands in Macros . 46 Repeat Commands in Macros . 46 Use Single Object Selection Mode in Macros . 47 Use Conditional Expressions in Macros . 47 Use AutoLISP in Macros . 48 Control the Display of Command Items . 50 Create Tooltips for Commands . 51 Create and Manage Images for Commands . 51 Assign Images to a Command . 52 Customize User Interface Elements . 52 Menus . 52 Overview of Menus . 52 Create and Manage Pull-down Menus . 53 Tool Sets . 56 Overview of Tool Sets and Tool Groups . 56 Create and Manage Tool Sets . 57 Chapter 5 DIESEL . 63 DIESEL Expressions in Macros . 63 Catalog of DIESEL Functions . 66 + (addition) . 66 - (subtraction) . 67 * (multiplication) . 67 / (division) . 67 = (equal to) . 67 iv | Contents < (less than) . 67 > (greater than) . 68 != (not equal to) . 68 <= (less than or equal to) . 68 >= (greater than or equal to) . 68 and . 69 angtos . 69 edtime . 69 eq . 71 eval . 71 fix . 71 getenv . 71 getvar . 72 if . 72 index . 72 nth . 72 or . 73 rtos . 73 strlen . 73 substr . 73 upper . 74 xor . 74 DIESEL Error Messages . 74 Chapter 6 Command Scripts . 75 Create Command Scripts . 75 Overview of Command Scripts . 75 Overview of Command Scripts . 76 Run Scripts at Startup . 77 Run Scripts at Startup . 78 Chapter 7 Introduction to Programming Interfaces . 79 AutoLISP . 79 Overview of AutoLISP . 79 Use AutoLISP Applications . 80 Automatically Load and Run AutoLISP Routines . 82 Overview of AutoLISP Automatic Loading . 82 The ACAD.LSP File . 83 The ACADDOC.LSP File . 84 The MNL File for an AutoLISP Menu . 85 Prevent AutoLISP Errors When Loading Startup Files . 85 S::STARTUP Function: Postinitialization Execution . 86 ObjectARX . 87 Overview of ObjectARX . 88 Use ObjectARX Applications . 88 Contents | v Install and Uninstall Plug-In Applications . 89 PackageContents.xml Format . 90 ApplicationPackage Element . 93 CompanyDetails Element . 95 Components Element . 96 Supported Locale Codes . 103 Example of Basic .bundle Folder Structure . 104 Example of Using Folders to Organize Components . 105 Chapter 8 Shapes and Shape Fonts . 109 Overview of Shape Files . 109 Overview of Shape Files . 110 Create Shape Definition Files . 110 Shape Descriptions . 111 Vector Length and Direction Code . ..