Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

AutoCAD & AutoCAD LT All-In-One Desk Reference For Dummies (2006)

.pdf
Скачиваний:
79
Добавлен:
17.08.2013
Размер:
17.7 Mб
Скачать

xviii AutoCAD & AutoCAD LT All-in-One Desk Reference For Dummies

Chapter 4: Moving from 2D to 3D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

307

Working with Regions ..................................................................................

307

Creating regions..................................................................................

308

Modifying regions...............................................................................

308

Getting more information about regions.........................................

309

3D Polylines and Helixes .............................................................................

310

3D polyline ..........................................................................................

310

Helix .....................................................................................................

310

Creating 3D Objects from 2D Objects........................................................

311

Thickness ............................................................................................

311

Extrude ................................................................................................

311

Loft .......................................................................................................

312

Sweep ...................................................................................................

312

Revolve ................................................................................................

313

Tabulated Mesh ..................................................................................

313

Revolved Mesh ...................................................................................

314

Ruled Mesh..........................................................................................

314

Edge Mesh ...........................................................................................

315

Creating 2D Objects from 3D Objects........................................................

315

Flatshot ................................................................................................

316

Section Plane.......................................................................................

316

Solid Draw, Solid View, and Solid Profile .........................................

317

3D Modify Commands .................................................................................

317

3D Move ...............................................................................................

318

3D Rotate .............................................................................................

318

Align .....................................................................................................

319

3D Align................................................................................................

319

Mirror 3D .............................................................................................

319

3D Array...............................................................................................

319

Chapter 5: Working with Solids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

321

Creating Solid Primitives.............................................................................

321

Polysolid ..............................................................................................

321

Box........................................................................................................

322

Wedge...................................................................................................

322

Cone .....................................................................................................

323

Sphere ..................................................................................................

323

Cylinder ...............................................................................................

324

Torus ....................................................................................................

324

Pyramid................................................................................................

324

Editing Solids ................................................................................................

325

Solid editing ........................................................................................

325

Using grips to edit solids...................................................................

327

Booleans ..............................................................................................

327

Filleting and chamfering ....................................................................

327

Slice ......................................................................................................

328

Table of Contents

xix

Chapter 6: Working with Surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . .

. .329

Creating Surfaces .........................................................................................

329

3D face .................................................................................................

329

3D mesh ...............................................................................................

330

Planar surface .....................................................................................

330

Box........................................................................................................

331

Wedge...................................................................................................

332

Cone .....................................................................................................

332

Sphere ..................................................................................................

333

Dish and dome ....................................................................................

333

Torus ....................................................................................................

334

Pyramid................................................................................................

334

Editing Surfaces............................................................................................

335

Controlling the visibility of edges ....................................................

335

Using grips to edit surfaces ..............................................................

336

Working with convert to surface ......................................................

336

Thicken ................................................................................................

336

Chapter 7: Rendering: Lights, Cameras, AutoCAD! . . . . . . . . . . . . .

. .337

Lighting a Scene ...........................................................................................

337

Default lights .......................................................................................

338

User lights ...........................................................................................

338

Sunlight................................................................................................

340

Getting the Right Look with Materials.......................................................

341

Setting Up a Backdrop .................................................................................

343

Rendering the Final Scene...........................................................................

343

Book VI: Advanced Drafting.......................................

347

Chapter 1: Playing with Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. .349

Working with Reusable Content .................................................................

349

Creating Blocks.............................................................................................

350

Accessing the Block Definition dialog box......................................

351

Exploring some advanced options...................................................

353

Inserting Blocks............................................................................................

354

Managing Blocks ..........................................................................................

356

Renaming a block definition .............................................................

356

Redefining a block definition ............................................................

357

Purging a block definition from a drawing ......................................

357

Exporting a block definition..............................................................

358

Enhancing Blocks with Attributes..............................................................

359

Adding an attribute to a block definition ........................................

359

Inserting a block with attributes ......................................................

362

Changing an attribute’s value in a block .........................................

363

Managing attributes in blocks ..........................................................

363

Extracting attribute data from blocks .............................................

363

xx AutoCAD & AutoCAD LT All-in-One Desk Reference For Dummies

Chapter 2: Dynamic Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.365

What Makes a Block Dynamic?...................................................................

365

Block Editor Environment...........................................................................

366

Components of the Block Editor ......................................................

367

Editing a block definition ..................................................................

369

Going Dynamic .............................................................................................

371

Adding parameters.............................................................................

373

Adding actions ....................................................................................

374

Using parameter sets .........................................................................

376

Visibility states ...................................................................................

376

Using Dynamic Blocks .................................................................................

378

Inserting a dynamic block .................................................................

379

Modifying a dynamic block ...............................................................

379

Dynamic Blocks in Older Releases.............................................................

380

Chapter 3: External References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

381

Blocks versus External References ............................................................

381

Working with External References .............................................................

382

DWG References ...........................................................................................

383

Attaching an xref ................................................................................

384

External reference notification .........................................................

386

Editing an xref .....................................................................................

387

Clipping an xref...................................................................................

389

Increasing the performance of xrefs ................................................

391

Binding an xref....................................................................................

392

Raster Images ...............................................................................................

393

Attaching a raster image ...................................................................

393

Clipping a raster image......................................................................

395

Controlling the appearance of a raster image ................................

396

DWF Underlays .............................................................................................

397

Attaching a DWF underlay.................................................................

397

Clipping a DWF underlay ...................................................................

399

Controlling the appearance of DWF underlay ................................

400

Draw Order ...................................................................................................

400

Object Linking and Embedding (OLE).......................................................

401

Managing External References Outside of AutoCAD ...............................

402

Chapter 4: Organizing Your Drawings . . . . . . . . . . . . . . . . . . . . . . . . . .

405

Why Bother to Organize Drawings?...........................................................

405

It’s all in the name ..............................................................................

405

Using the Windows Clipboard ....................................................................

406

Copying objects from a drawing.......................................................

406

Cutting objects from a drawing ........................................................

406

Pasting objects into a drawing .........................................................

407

AutoCAD DesignCenter ...............................................................................

407

Locating resources in drawings........................................................

409

Adding resources to drawings..........................................................

411

Inserting hatches and loading linetypes .........................................

412

Table of Contents

xxi

Using the Tool Palettes Window ................................................................

412

Blocks, xrefs, images, tables, and hatches......................................

413

Command and flyouts tools ..............................................................

413

Modifying tools on a tool palette .....................................................

413

Chapter 5: AutoCAD Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. .415

Filtering Objects during Selection..............................................................

415

Quick Select.........................................................................................

415

Filter .....................................................................................................

417

AutoCAD Calculator.....................................................................................

419

Using QuickCalc with the Properties palette..................................

422

Using QuickCalc with a command....................................................

422

Auditing and Recovering Drawings............................................................

423

Auditing a drawing .............................................................................

423

Recovering a drawing ........................................................................

424

Using the Drawing Recovery Manager ............................................

425

Book VII: Publishing Drawings ...................................

427

Chapter 1: Page Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. .429

Preparing for Output with Page Setups.....................................................

430

Options of a page setup.....................................................................

430

Working with page setups .................................................................

432

Organizing a Drawing with Layouts ...........................................................

435

Working with layouts .........................................................................

436

Looking at a Model through Viewports.....................................................

441

Defining a viewport’s shape ..............................................................

442

Controlling scale.................................................................................

446

Controlling the display within a viewport.......................................

446

Modifying a viewport .........................................................................

448

Chapter 2: Sheet Sets without Regret . . . . . . . . . . . . . . . . . . . . . . . .

. .449

Overview of a Sheet Set...............................................................................

449

Sheet Set Manager ..............................................................................

451

Creating a Sheet Set .....................................................................................

451

Starting from scratch .........................................................................

452

Starting from an existing sheet set...................................................

455

Managing Drawings with a Sheet Set .........................................................

456

Opening a sheet set............................................................................

456

Importing existing drawings as sheets ............................................

457

Organizing with subsets ....................................................................

459

Setting up a sheet set and subset for adding new sheets .............

460

Adding a new sheet ............................................................................

463

Opening a sheet ..................................................................................

464

Removing, renaming, and renumbering a sheet.............................

464

xxii AutoCAD & AutoCAD LT All-in-One Desk Reference For Dummies

Sheet set and sheet properties.........................................................

465

Setting up callouts and label blocks ................................................

468

Adding resource drawings ................................................................

472

Adding model views to a sheet.........................................................

473

Publishing, eTransmitting, and Archiving a Sheet Set ............................

476

Chapter 3: Print, Plot, Publish . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. .477

You Say Printing, We Say Plotting, They Say Publishing.........................

477

Working with drivers..........................................................................

478

Configuring a printer or plotter........................................................

479

Putting style in your plots.................................................................

484

Outputting Made Easy .................................................................................

488

Plotting the Model tab .......................................................................

489

Plotting a paper space layout ...........................................................

491

Scaling your drawing .........................................................................

492

More plotting options ........................................................................

492

Publishing Drawings ....................................................................................

494

Book VIII: Collaboration ............................................

497

Chapter 1: CAD Management: The Necessary Evil . . . . . . . . . . . . .

. .499

Getting a Handle on the Basics of CAD Management ..............................

499

Managing the Drafting Environment..........................................................

502

Creating a Good Foundation .......................................................................

503

Creating a drawing template file.......................................................

504

Using a drawing template file ...........................................................

505

Specifying a drawing template file for use with QNEW .................

506

Specifying the location of drawing template files ..........................

508

Chapter 2: CAD Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. .509

CAD Standards Overview ............................................................................

509

Using AutoCAD’s CAD Standards Tools.....................................................

511

Drawing standards (.DWS) files........................................................

512

Managing standards...........................................................................

513

Translating layers...............................................................................

518

Batch checking drawings ..................................................................

522

Chapter 3: Working with Drawing Files . . . . . . . . . . . . . . . . . . . . . .

. .527

It’s All in the Name: Creating Naming Conventions .................................

527

Part of a Drawing Can Be a Good Thing: Working with Partial Open

....528

Controlling What Happens during a Save .................................................

532

Getting a handle on drawing file formats ........................................

532

Indexing the content of a drawing....................................................

533

Protecting Your Drawings ...........................................................................

535

Password-protecting ..........................................................................

535

Digital signatures................................................................................

539

Table of Contents

xxiii

Chapter 4: Sharing Electronic Files . . . . . . . . . . . . . . . . . . . . . . . . .

. . .547

Sharing Drawings with Non-AutoCAD–based Products ..........................

547

Taking Drawings to the Internet.................................................................

548

Using an FTP site ................................................................................

549

Publishing drawings to the Web.......................................................

551

Using Web-based project sites..........................................................

556

Emulating Paper Digitally............................................................................

558

Design Web Format (DWF) ...............................................................

559

Portable Document File (PDF) ..........................................................

560

Head-to-head comparison .................................................................

560

Working with DWFs......................................................................................

561

Creating a DWF file .............................................................................

562

Viewing a DWF file .............................................................................

563

Electronically marking up a DWF file ...............................................

564

Book IX: Customizing AutoCAD ..................................

567

Chapter 1: The Basics of Customizing AutoCAD . . . . . . . . . . . . . . .

. .569

Why Customize AutoCAD?..........................................................................

569

Customizing the AutoCAD Startup Process..............................................

571

Startup options...................................................................................

571

Using command line switches ..........................................................

572

Changing Options and Working with User Profiles..................................

577

Launching the Options dialog box ...................................................

578

Overview of AutoCAD options..........................................................

578

Working with user profiles ................................................................

579

Creating and Managing Command Aliases................................................

582

Editing the PGP file.............................................................................

582

Working with the AutoCAD Alias Editor ..........................................

584

Chapter 2: Customizing the Interface . . . . . . . . . . . . . . . . . . . . . . . . .

. .587

Getting Familiar with the Status Bar..........................................................

587

Getting to know the Icon Tray ..........................................................

589

Powering the status bar with DIESEL ..............................................

592

Training Your Toolbars and Dockable Windows to Stay.........................

593

Locking UI toolbars and dockable windows ...................................

593

Locking and unlocking toolbars and dockable windows ..............

594

Controlling the Appearance and Displays of AutoCAD...........................

595

Window elements ...............................................................................

595

Layout elements .................................................................................

597

Crosshair size......................................................................................

598

Display resolution ..............................................................................

598

Display performance..........................................................................

599

Reference Edit fading intensity.........................................................

600

Organizing Your Space.................................................................................

600

Using the Workspace toolbar............................................................

600

Using the Customize User Interface editor .....................................

602

Maximizing the drawing space .........................................................

605

xxiv AutoCAD & AutoCAD LT All-in-One Desk Reference For Dummies

Chapter 3: Customizing the Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

607

How Customizing the User Interface Has Changed .................................

607

Getting to Know the Customize User Interface Editor ............................

608

The Customizations In pane .............................................................

608

The Command List pane....................................................................

609

The Dynamic pane..............................................................................

610

Launching the Customize User Interface (CUI) editor ..................

611

Commands in the CUI editor.............................................................

612

Customizing Toolbars and Pull-Down and Shortcut Menus ...................

615

Toolbars...............................................................................................

615

Pull-down menus ................................................................................

617

Shortcut menus ..................................................................................

619

Separator bars ....................................................................................

622

Creating a New Shortcut Key......................................................................

622

Customizing Double-Click Actions.............................................................

623

Migrating and Transferring Customization...............................................

624

Working with Partial and Enterprise Customization Files ......................

626

Loading an enterprise customization file........................................

626

Loading a partial customization file ................................................

627

Chapter 4: Delving Deeper into Customization . . . . . . . . . . . . . . . . . .

629

Working from a Script ..................................................................................

629

What is a script file?...........................................................................

630

Creating a script file ...........................................................................

632

Loading and running a script file .....................................................

632

Running a script file at startup .........................................................

633

It’s All in the Linetype..................................................................................

633

Simple linetypes .................................................................................

634

Complex linetypes..............................................................................

637

Getting Familiar with Shapes......................................................................

638

Creating Custom Patterns ...........................................................................

639

The structure of a hatch pattern......................................................

639

Creating a hatch pattern....................................................................

642

Using a custom hatch pattern file ....................................................

643

Working with Express Tools .......................................................................

643

Installing Express Tools.....................................................................

644

Layer tools...........................................................................................

644

Block tools...........................................................................................

645

Text tools.............................................................................................

646

Layout tools ........................................................................................

647

Dimension tools..................................................................................

647

Modify tools ........................................................................................

647

Draw tools ...........................................................................................

648

File tools ..............................................................................................

648

Tools.....................................................................................................

648

Command line only tools...................................................................

649

Table of Contents

xxv

Book X: Programming AutoCAD..................................

651

Chapter 1: The AutoCAD Programming Interfaces . . . . . . . . . . . . .

. .653

Discovering What You Can Do by Programming AutoCAD.....................

654

The advantages of using APIs ...........................................................

654

The other side of the story ...............................................................

655

Getting to Know the Available Programming Interfaces .........................

655

AutoLISP ..............................................................................................

656

ActiveX automation............................................................................

657

VBA.......................................................................................................

658

ObjectARX and ObjectDBX ...............................................................

658

.NET......................................................................................................

659

Comparing Strengths and Weaknesses

 

of the Programming Interfaces ...............................................................

659

Deciding Which Programming Interface Is Best for You .........................

661

Chapter 2: Using Custom Programs . . . . . . . . . . . . . . . . . . . . . . . . . .

. .663

Identifying Application Files .......................................................................

663

Loading and Unloading Applications.........................................................

664

The Load/Unload Applications dialog box......................................

664

Loading an AutoLISP file....................................................................

668

Loading and unloading a VBA file ....................................................

669

Loading and unloading an ObjectARX file.......................................

672

Automatically Loading Application Files ..................................................

674

Using the Startup Suite ......................................................................

674

Getting AutoCAD to do some of the work .......................................

676

Running a Program in an Application File.................................................

678

Chapter 3: Introducing AutoLISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. .681

Accessing the AutoLISP Development Environment ...............................

681

Launching the Visual LISP IDE ..........................................................

682

Loading an existing AutoLISP application file ................................

682

Using the VLIDE............................................................................................

683

Controlling color coding in the Text window .................................

685

Controlling text size and font style in the Text window................

686

Navigating the Text window..............................................................

687

Creating a Basic Program............................................................................

688

Creating a new AutoLISP file .............................................................

688

Anatomy of an AutoLISP expression................................................

689

Adding comments ..............................................................................

690

To command or just to function.......................................................

691

Creating your first AutoLISP program .............................................

692

More Than Just the Essentials of AutoLISP ..............................................

694

Supported data types ........................................................................

694

Math functions....................................................................................

695

String functions ..................................................................................

696

List functions ......................................................................................

696

xxvi AutoCAD & AutoCAD LT All-in-One Desk Reference For Dummies

Data conversion functions ................................................................

697

Saving and accessing values for later ..............................................

698

Exchanging information with AutoCAD...........................................

699

Getting Information to and from the User.................................................

701

Giving feedback to the user ..............................................................

701

Other functions to note .....................................................................

702

Using the Debug Tools in the Visual LISP IDE...........................................

705

Breakpoints .........................................................................................

705

Watch what is happening ..................................................................

705

Setting up breakpoints and using watch .........................................

706

AutoLISP error messages ..................................................................

708

Going GUI with DCL......................................................................................

709

Basics of DCL ......................................................................................

709

Adding comments ..............................................................................

711

Using AutoLISP to add interaction to DCL ......................................

711

Using ActiveX Automation with AutoLISP ................................................

715

Referencing the AutoCAD Application.............................................

715

Using methods of an object ..............................................................

715

Setting and retrieving a property of an object ...............................

716

Revising the BCIRC command ..........................................................

717

Chapter 4: Visual Basic for AutoCAD . . . . . . . . . . . . . . . . . . . . . . . . . . .719

AutoCAD Commands for VBA.....................................................................

720

VBAIDE.................................................................................................

720

VBALOAD ............................................................................................

720

VBAUNLOAD .......................................................................................

722

VBARUN...............................................................................................

723

VBAMAN ..............................................................................................

724

Other commands................................................................................

725

Working with the IDE ...................................................................................

726

Exploring the IDE................................................................................

726

Project Explorer..................................................................................

726

Properties window .............................................................................

727

Code and UserForm windows...........................................................

728

Object Browser ...................................................................................

728

Parts of a VBA Project .................................................................................

730

Standard code module.......................................................................

731

Class code module .............................................................................

731

Procedures (subroutine or function)...............................................

731

Declaring variables.............................................................................

732

Data types............................................................................................

732

Assigning a value to a variable .........................................................

733

The basics of working with objects .................................................

733

Adding comments ..............................................................................

734

Introducing the AutoCAD Object Model ...................................................

734

Create a basic VBA project................................................................

735

Index........................................................................

741

Introduction

For many reasons, AutoCAD is much different from most applications that you will ever use. The main reason goes back some 20 years to when AutoCAD was first introduced as a low-cost CAD solution on micro-

computers. (CAD stands for Computer-Aided Drafting or Computer-Aided Design, depending on whom you ask.) Most CAD applications back then ran on very large and expensive mainframe computers, not something that you could take on-site with you.

With the introduction of AutoCAD, CAD wasn’t as foreign of a topic as it once was, but it still had an uphill climb against the wide use and adoption of drafting boards. A drafting board, you might be asking yourself? Yes, prior to computers and CAD, all designs were done with pencil and paper; if you were really good, you used ink and paper. Today, paper still plays a role in distributing designs, but most designs are now done in a CAD application that allows you to do much more complex things that were not possible with board drafting.

As times and drafting practices have changed, AutoCAD has either led in setting the pace for change or has forced change with some things. Some of these changes have helped to usher in the era of improved design collaboration across the Internet and better electronic file sharing with non-CAD users. Since all objects in a drawing are electronic, AutoCAD allows you to quickly manipulate and mange them without the need to break out the eraser shield and eraser as you would on a board. Autodesk continues to improve the way you can visualize designs and concepts through improvements in 3D modeling and other features.

AutoCAD 2007 gives you the tools you need to create accurate 2D and 3D designs, but isn’t very easy to just pick up and become productive right away. This book helps you get up to speed faster so that you can be productive in all main areas of the application — which include 2D and 3D drafting, printing and sharing designs, and customizing and programming.

About This Book

The AutoCAD & AutoCAD LT All-in-One Desk Reference For Dummies gives you an understanding of all the main features that you need to know in order to be productive with AutoCAD and AutoCAD LT. The All-in-One Desk References For Dummies are much different from other For Dummies books you may have