AutoCAD Platform Customization
AutoLISP
Häftad, Engelska, 2015
379 kr
Beställningsvara. Skickas inom 3-6 vardagar. Fri frakt för medlemmar vid köp för minst 249 kr.
Finns i fler format (1)
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 spaceDiscover how to create macros for frequently performed actions, or add your company's logo to the bottom of every drawingLearn to perform more involved customizations, like communicating with a database to validate and update information entered in drawing layersIdeal for CAD administrators, senior drafters, savvy users, and other professionals and studentsThrough detailed discussions and tutorials that include real-world examples, this book gives you the power to enhance your program's experience and output.
Produktinformation
- Utgivningsdatum2015-10-19
- Mått190 x 235 x 22 mm
- Vikt726 g
- FormatHäftad
- SpråkEngelska
- Antal sidor424
- FörlagJohn Wiley & Sons Inc
- ISBN9781118798812
Tillhör följande kategorier
Lee Ambrosius is a Principal Learning Content Developer at Autodesk for AutoCAD and AutoCAD LT products and has worked on end-user and API documentation for nine releases. He has presented customization and programming sessions at Autodesk University for a decade, and has authored and edited several AutoCAD-related books. Follow him on twitter at @leeambrosius.
- Introduction xix Chapter 1 • Quick Start for New AutoLISP Programmers 1Working with AutoLISP Expressions 1Working with Commands and Input 3Conditionalizing and Repeating Expressions 5Grouping Expressions 7Storing and Loading AutoLISP Expressions 9Chapter 2 • Understanding AutoLISP 15Getting Started with AutoLISP 15Understanding the Syntax of an Expression 16Executing Expressions 18Accessing the AutoLISP Documentation 19Storing and Retrieving Values 19Setting and Using Variables 21Working with System Variables 25Accessing Environment Variables 26Exploring Data Types 28Leveraging AutoCAD and Third-Party Commands 30Using the command Function 31Using the command-s Function 32Working with Commands That Display a Dialog Box 33Defining and Using Custom Functions 33Defining a Custom Function 34Using a Custom Function 35Example: Drawing a Rectangle 36Chapter 3 • Calculating and Working with Values 39Calculating Values with Math Functions 39Performing Basic Math Calculations 39Performing Advanced Math Calculations 43Working with Bitwise Operations 44Manipulating Strings 48Concatenating Strings 49Getting the Length of and Searching for Strings 49Replacing and Trimming Strings 51Changing the Case of a String 55Evaluating Values to Strings 56Converting Data Types 57Converting Numeric Values to Strings 57Converting Strings to Numeric Values 58Converting Numeric Values to Other Number Types 60Returning a Value from a Custom Function 61Exercise: Drawing a Rectangle (Revisited) 63Creating the drawplatelsp File 64Revising the drawplate Function 65Adding the Revised drawplate Function to drawplatelsp 66Creating the utilitylsp File 67Loading the LSP Files into AutoCAD 68Chapter 4 • Working with Lists 71What Are Lists? 71Creating a List 73Getting an Element from a List 74Retrieving a Specifi c Element 75Stepping Through a List 78Appending, Substituting, and Removing Elements 79Appending Elements 79Substituting Elements 81Removing Elements 81Determining Whether an Item Exists in a List 82Sorting the Elements of a List 84Using Point Lists to Calculate Geometric Values 84Measuring Angular and Distance Values 85Calculating Points 86Finding and Snapping to Points 86Translating Points 88Converting Measurement Units 88Accessing the AutoCAD Calculator 89Converting Lists to Strings and Strings to Lists 90Exercise: Adding Holes to the Plate 90Defining the New Get-Sysvars and Set-Sysvars Utility Functions 91Defining the New createcircle Utility Function 93Revising the drawplate Function 94Using the Revised drawplate Function 95Chapter 5 • Requesting Input and Using Conditional and Looping Expressions 97Interacting with the User 97Requesting Input at the Command Prompt 98Providing Feedback to the User 113Working with the Graphics Windows 118Conditionalizing and Branching Expressions 120Comparing Values 120Grouping Comparisons 126Validating Values 126Evaluating if a Condition Is Met 127Testing Multiple Conditions 129Repeating and Looping Expressions 131Repeating Expressions a Set Number of Times 132Performing a Task While a Condition Is Met 133Exercise: Getting Input from the User to Draw the Plate 137Revising the drawplate Function 137Using the Revised drawplate Function 140Chapter 6 • Creating and Modifying Graphical Objects 143Working with Entity Names and Dotted Pairs 143Creating a Dotted Pair 145Accessing the Elements of an Entity Data List and Dotted Pair 146Adding Objects to a Drawing 147Selecting Objects 152Selecting an Individual Object 152Working with Selection Sets 154Filtering Selected Objects 160Modifying Objects 161Listing and Changing the Properties of an Object Directly 162Updating an Object’s Properties with an Entity Data List 168Deleting an Object 171Highlighting Objects 172Working with Complex Objects 173Creating and Modifying Polylines 173Creating and Modifying with Block References 176Extending an Object’s Information 180Working with XData 180Defining and Registering an Application Name 181Attaching XData to an Object 181Querying and Modifying the XData Attached to an Object 184Removing XData from an Object 186Selecting Objects Based on XData 186Exercise: Creating, Querying, and Modifying Objects 187Revising the Functions in utilitylsp 187Testing the Changes to the drawplate Function 188Defining the New Get-DXF-Value and Set-DXF-Value Utility Functions 189Moving Objects to Correct Layers 190Creating a Basic Block Attribute Extraction Program 192Using the Functions in the furntoolslsp File 196Chapter 7 • Creating and Modifying Nongraphical Objects 199Working with Symbol Tables 199Accessing and Stepping through Symbol Tables 200Adding and Modifying Entries in a Symbol Table 202Creating and Modifying Block Definitions 208Working with Dictionaries 210Accessing and Stepping through Dictionaries 210Creating a Custom Dictionary 213Storing Information in a Custom Dictionary 215Managing Custom Dictionaries and Entries 215Exercise: Creating and Incrementing Room Labels 216Revising the createlayer Function in utilitylsp 217Creating the Room Label Block Defi nition 217Inserting a Block Reference Based on the Room Label Block Definition 219Prompting the User for an Insertion Point and Room Number 222Adding Room Labels to a Drawing 224Chapter 8 • Working with the Operating System and External Files 227Storing Information in the Windows Registry or a Plist File 227Creating and Querying Entries 228Editing and Removing Entries 230Accessing Data from External Files 231Opening and Creating an External File 231Reading Characters and Lines from a File 234Writing Characters and Lines from a File 235Closing an Open File 236Working with Directories and Files in the Operating System 237Locating and Listing Files and Directories 237Managing Files and Directories 243Getting Information about a File 244Exercise: Reading and Writing Data 244Creating Layers Based on Data Stored in an External File 245Adding Layers to a Drawing with the loadlayers Function 247Writing the Bill of Materials to an External File 248Using the furnbomexport Function 249Chapter 9 • Catching and Handling Errors 251Identifying and Tracking Down Errors 251Putting Your Code Under the Microscope 252Displaying Messages During Execution 254Tracing Functions 259Catching Errors in a Program 260Defining and Using a Custom Error Handler 262Grouping Functions into a Single Undo Action 263Exercise: Handling Errors in the drawplate Function 266Using the drawplate Function 267Implementing a Custom *error* Handler and Undo Grouping 268Testing the Changes to the drawplate Function 269Chapter 10 • Authoring, Managing, and Loading AutoLISP Programs 271Storing AutoLISP Expressions 271Selecting an Editing Environment 272Creating an AutoLISP File 272Editing an AutoLISP File 274Writing Modular Code 275Adding Comments 276Undefining and Redefining Standard AutoCAD Commands 279Defining a Startup Function 280Loading AutoLISP Files 281Manually Loading an AutoLISP File 281Automatically Loading an AutoLISP File 282Using the Load/Unload Applications Dialog Box to Load a LSP File 284Managing the Locations of AutoLISP Files 287Specifying Support File Search Paths 287Identifying Trusted Locations 289Deploying AutoLISP Files 291Deployment Methods (Local vs External) 292Defining a Plug-in Bundle 294Implementing Help for Custom Functions 296Exercise: Deploying the drawplate Function 298Loading the utilitylsp File by Reference 298Loading the drawplatelsp File on Demand 299Enabling Help Support for the drawplate Function 299Configuring the AutoCAD Support and Trusted Paths 300Testing the Deployment of the drawplate Function 301Creating DrawPlatebundle 302Deploying and Testing the DrawPlatebundle 303Chapter 11 • Using the Visual LISP Editor (Windows only) 305Accessing the Visual LISP Editor 305Managing AutoLISP Files with the Visual LISP Editor 306Formatting an AutoLISP File 307Coloring Syntax 308Formatting Code 309Commenting Code 310Validating and Debugging Code 310Executing Code from the Visual LISP Editor 310Checking and Loading Code in the Current Editor Window 311Debugging Code 313Creating a Visual LISP Project 315Compiling LSP and PRJ Files into a VLX File 317Exercise: Working with the Visual LISP Editor 318Formatting, Checking, and Debugging the badcode Function 318Stepping Through and Inspecting the badcode Function 320Creating and Compiling a Project 323Chapter 12 • Working with ActiveX/COM Libraries (Windows only) 325Understanding the Basics of ActiveX 325Accessing Classes, Objects, and Collections 326Specifying Properties and Invoking Methods 329Working with Variants and Arrays 332Importing COM Libraries 336Using the AutoCAD COM Library 337Accessing the AutoCAD Application and Current Drawing Objects 338Working with Graphical and Nongraphical Objects in the Current Drawing 339Monitoring Events with Reactors 342Leveraging the Windows and Microsoft Office COM Libraries 344Accessing the Windows Shell Object 345Working with Microsoft Office 347Chapter 13 • Implementing Dialog Boxes (Windows only) 349What Is Dialog Control Language? 349Defining and Laying Out a Dialog Box 351Defining a Dialog 351Adding Tiles 352Grouping, Aligning, and Laying Out Tiles 356Creating and Previewing a Dialog in a DCL File 360Loading and Displaying a Dialog Box 362Loading and Unloading a DCL File 362Displaying a Dialog 363Initializing Tiles 365Interacting with and Responding to a User 369Specifying the Action of a Tile 369Getting Information about a Tile 370Terminating or Closing a Dialog Box 371Hiding a Dialog Box Temporarily 372Exercise: Implementing a Dialog Box for the drawplate Function 373Creating the drawplate Dialog Box 374Renaming the Existing drawplate Function 376Defining a New drawplate Function 376Testing the drawplatelsp Changes 379Index 381
Hoppa över listan



Mer från samma författare
AutoCAD 2009 and AutoCAD LT 2009 All-in-One Desk Reference For Dummies
Lee Ambrosius
Häftad, 2008
389 kr
AutoCAD and AutoCAD LT All-in-One Desk Reference For Dummies
David Byrnes, Lee Ambrosius
Häftad, 2006
429 kr
Hoppa över listan








Du kanske också är intresserad av
AutoCAD 2009 and AutoCAD LT 2009 All-in-One Desk Reference For Dummies
Lee Ambrosius
Häftad, 2008
389 kr
AutoCAD and AutoCAD LT All-in-One Desk Reference For Dummies
David Byrnes, Lee Ambrosius
Häftad, 2006
429 kr
- Nyhet
Del 3
- Nyhet
- Nyhet
Del 6
- Nyhet
Del 7