1© 2006 Autodesk AutoCAD: Secrets Every User Should Know Chapter 9 – AutoLISP by Example: Getting Better.

Slides:



Advertisements
Similar presentations
How to create leaders to indicate details or callouts in AutoCAD.
Advertisements

Introduction to Eclipse. Start Eclipse Click and then click Eclipse from the menu: Or open a shell and type eclipse after the prompt.
Objectives Build and modify an organization chart.
ENGT 122 – CAD I Chapter 6 – Editing With Grips. Get a Grip! What are Grips? Small squares displayed on an object at its definition points when selected.
PLEASE USE THE ENTER KEY RIGHT CLICK ON THE MOUSE TO ADVANCE
AUTOLISP DRAWING (continued)
LESSON 5 PREPARING THE AUTOLISP CODE It is assumed that you have completed. Therefore the following lesson will show you what happens when you press the.
Select New Project from Project menu to create a new project File.
Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Chapter 9: Hatching, Gradients and Boundaries. After completing this Chapter, you will be able to use the following features: What is Hatching? What is.
ENGT122 - CADI Chapter 15 - Hatching. What is Hatching? Hatching refers to filling an enclosed boundary with a repetitive pattern of formatted line segments.
Chapter 3 Setting Up A Document.
Chapter 9: Hatching, Gradients and Boundaries. What is Hatching? What is Gradient Fill? Defining the Hatch or Gradient Boundary Create hatch and gradient.
Civil 114 Civil Engineering Drawing AutoCAD
CIVL 114 Civil Engineering Drawing
Web Page Development Identify elements of a Web Page Start Notepad
CVEV 118/698 AutoCAD 2000 Lecture 1 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
Quark QuarkXPress 4 Foundation Level Course. What is QuarkXPress? This courseware teaches the fundamentals of QuarkXPress 4.1. It is a page layout application.
Pasewark & Pasewark 1 Access Lesson 4 Creating and Modifying Forms Microsoft Office 2007: Introductory.
Chapter 18: Customizing AutoCAD. After completing this Chapter, you will be able to do the following: Workspaces Ribbons, Tabs, and Panels Quick Access.
1-- Setup AutoCAD today a-Create documents – Wizard Quick Set Up – Area – units Advanced Set Up – Area – Units – Angles.
A Mid-Term study guide of covered commands. SAVING  Using the Save command allows the drafter to save an already developed drawing.  The Save As command.
ENGR-22_Lec-04_2D_Construction-2.ppt 1 Bruce Mayer, PE Engineering 22 – Engineering Design Graphics Bruce Mayer, PE Licensed Electrical.
EDT Chapter 41 Review - Linetypes Sacramento City College EDT 310.
CARLSON SOFTWARE CONFERENCE DANIEL V. SYPERSMA VICTOR GRAPHICS.
Microsoft Word 2000 Presentation 5. Major Word Topics Columns Tables Lists.
1 AutoCAD: Secrets Every User Should Know Chapter 7 - AutoCAD Scripts.
© 2006 Autodesk AutoCAD: Secrets Every User Should Know Chapter 8 - AutoLISP by Example: Getting Started.
1. Chapter 12 Inserting Shapes and WordArt 3 Inserting Shapes, WordArt, and More Create shapes, text boxes, and WordArt to add visual appeal to a Word.
Chapter 19: Visual Lisp. After completing this Chapter, you will be able to do the following: What is AutoLISP Launching Visual LISP Terminology and Fundamental.
1 Draw Mode. 2 Notable Points (RMB) End point: Snaps to the closest end point of the selected entity. Mid point: Snaps to the middle point of the selected.
© 2010 Delmar, Cengage Learning Chapter 3 Setting Up A Document.
Chapter 1 Creating a Dreamweaver Web Page and Local Site
Laboratory Exercise # 9 – Inserting Graphics to Documents Office Productivity Tools 1 Laboratory Exercise # 9 Inserting Graphics to Documents Objectives:
Tables Sacramento City College Engineering Design Technology.
1. Chapter 15 Creating Charts 3 Charting Data in Word A chart or graph presents data visually. A chart depicts numeric data in a graphical format. If.
Adobe InDesign CS2--Revealed WORKING WITH TEXT. Chapter 2 Working with Text Chapter Objectives Format text Format paragraphs Create and apply styles Edit.
AutoCAD: Secrets Every User Should Know Chapter 3 – Customizing the AutoCAD Interface.
Chapter 13: AutoCAD DesignCenter. After completing this Chapter, you will be able to use the following: Overview of DesignCenter Container, Content Type.
Chapter 11: Block References and Attributes. After completing this Chapter, you will be able to use the following features: Create and insert block references.
EDT AutoCAD Layers1 Using AutoCAD Layers Sacramento City College EDT 310.
External Commands1 Sacramento City College Engineering Design Technology.
Who Wants to be a Millionaire? LIFELINES 1.50/50 2.Poll the audience 3.Ask Another Student.
© 2011 Delmar, Cengage Learning Chapter 3 Setting Up A Document.
AutoCAD 3D Fundamentals
AUTOLISP Prof.Dr. Demir Bayka. AUTOLISP 1.Declare and set values to variables 2.Pick the elements of lists 3.Implement AutoCad commands 4.Select Entities.
I NTRODUCTION TO A UTO CAD P ART 2 Lab 8. CHAPTER OBJECTIVES Creating New Layers Assigning Colors to Layers Assigning Linetypes Assigning Lineweight Changing.
Chapter 8: Plotting. After completing this Chapter, you will be able to use the following features: Planning the Plot Sheet Plotting Environments Plotting.
EDT Chapter 13 - Obtaining Drawing Information1 Obtaining Information About The Drawing Sacramento City College EDT 310.
EDT Chapter 41 Using Layers Chapter 4 Sacramento City College EDT 310.
Grips - Automatic Editing1 Sacramento City College Engineering Design Technology.
Introduction to Drafting and Design In order to begin our drawing we have to set the drawing limits or the paper size.
Debugging tools in Flash CIS 126. Debugging Flash provides several tools for testing ActionScript in your SWF files. –The Debugger, lets you find errors.
EXPORT Converting HYPACK ® Data Files to DXF, DWG, DGN, User Defined Formats.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
Chapter 7: Dimensioning. Dimension Terminology Associative/Non-Associative Dimensioning Linear Dimensioning Aligned Dimensioning Ordinate Dimensioning.
CIS 205—Web Design & Development Flash Chapter 3 Working with Symbols and Interactivity.
Chapter 2 – Quick Start. Create a new drawing Saving your work Switch between Layout Space and Model Space Draw some basic AutoCAD objects Toggle the.
AutoCAD Tutorial (introductory level). 1. Working environment : Drawing area, Menus, Tools bars, Buttons. 2. Interaction: How to execute a command. 4.
Drawing Geometric Objects
User Profiles and Workspaces
Drafting I Unit 4 Section 3
Drawing Set-up & Introduction to CADD
Welcome! Drafting 1309: Basic CAD
Autodesk Certified User: AutoCAD
BASIC DRAWING COMMANDS FOR AUTOCAD
CVEV 118/698 AutoCAD 2000 Lecture 1 Prof. Mounir Mabsout Elsa Sulukdjian Walid El Asmar.
Introduction to Multilines
Using Templates and Library Items
Basic Editing Techniques
Presentation transcript:

1© 2006 Autodesk AutoCAD: Secrets Every User Should Know Chapter 9 – AutoLISP by Example: Getting Better

2© 2006 Autodesk Debugging

3© 2006 Autodesk Debugging Quotation Marks Too Much Magenta? Parenthesis Jumping Step to End/Beginning Ctrl+[ and Ctrl+] Check Program Variables Set break point Add to Watch window !variable name at AutoCAD command line Type variable at console in VLISP

4© 2006 Autodesk Debugging Parenthesis Jumping

5© 2006 Autodesk Debugging Broken Program - Add Variable to Watch Window

6© 2006 Autodesk Debugging Broken Program - Add Break Points

7© 2006 Autodesk Final Touches Command Echo Command: SSECT Angle of structural section : ucs Current ucs name: *WORLD* Enter an option [New/Move/orthoGraphic/Prev/Restore/Save/Del/Apply/? /World] : z Specify rotation angle about Z axis : Command: First corner of rectangle: Diagonal corner of rectangle RECTANG Specify first corner point or [Chamfer/Elevation/Fillet/Thickness/Width]: Etc… etc…etc… Command: nil CMDECHO = 0 Command: ssect Angle of structural section : First corner of rectangle: Diagonal corner of rectangle

8© 2006 Autodesk Error Handling and Annotation

9© 2006 Autodesk Error Handling Two General Strategies Global - Sets an Undo M and rolls back Local - specific to individual program - preferred 1.Start UNDO group with BEgin option. 1.Save variables that are changed in the program using SETQ. 1.Write an error-trapping function that resets those variables. 1.Place the error-trapping function in file immediately before the command function it applies to.

10© 2006 Autodesk Error Handling

11© 2006 Autodesk Annotation

12© 2006 Autodesk Annotation

13© 2006 Autodesk Entity Selection and Manipulation

14© 2006 Autodesk Entity Selection ASSOC, ENTSEL, ENTGET Very Important Line of Code Assoc 5 Gives You the Entity’s Handle Change the 5 to 0, and You Get the Entity Type Other DXF Group Codes Give You Other Information

15© 2006 Autodesk Entity Selection Break Down the Code from the Inside Out (car (entsel) Returns first item in list (entsel)Prompted to select one entity Returns the pick point and name ( ( ))

16© 2006 Autodesk Entity Selection Break Down the Code from the Inside Out (entget (car (entsel))) Returns association lists of entity’s data ((-1. ) (0. "CIRCLE") (330. ) (5. "8D") (100. "AcDbEntity") (67. 0) (410. "Model") (8. "0") ( ) (100. "AcDbCircle") ( ) ( ) ( ))

17© 2006 Autodesk Entity Selection Break Down the Code from the Inside Out (assoc 5 (entget (car (entsel)))) Returns association list 5 (entity’s handle) ((-1. ) (0. "CIRCLE") (330. ) (5. "8D") (100. "AcDbEntity") (67. 0) (410. "Model") (8. "0") ( ) (100. "AcDbCircle") ( ) ( ) ( ))

18© 2006 Autodesk Entity Selection Break Down the Code from the Inside Out (cdr (assoc 5 (entget (car (entsel))))) Returns all but first item in association list 5 ((-1. ) (0. "CIRCLE") (330. ) (5. "8D") (100. "AcDbEntity") (67. 0) (410. "Model") (8. "0") ( ) (100. "AcDbCircle") ( ) ( ) ( ))

19© 2006 Autodesk Entity Selection DXF Group Codes – Help System in VLISP Some Examples: 0Entity type 7Entity’s text style name 8Entity’s layer name 10Entity’s primary point 48Entity’s linetype scale 62Entity’s color Some Codes Not Listed if They Are Defaults 48 is nil if Entity’s LTSCALE is 1

20© 2006 Autodesk Entity Selection Sample Program A selective matchprop command for just linetype scale (entget)

21© 2006 Autodesk Entity Selection SSGET Can Have Conditions Let’s select: All text between 2 and 6 mm, or Text not on “TEXT” layer, and then… Change Height of all to 3mm Place all on “TEXT” layer.

22© 2006 Autodesk ENTMOD, SUBST, ENTUPD Entities Can Be Modified Directly as Well Substitute a New ASSOC List for Existing Modify Entity’s List of Data Update Entity in Drawing

23© 2006 Autodesk IF Function Default Setting Meet Condition

24© 2006 Autodesk REPEAT Function

25© 2006 Autodesk COND Function

26© 2006 Autodesk WHILE Function

27© 2006 Autodesk Text and String Manipulation

28© 2006 Autodesk GETFILED AutoCAD Release Format Get File Dialog Box

29© 2006 Autodesk DOS in AutoLISP Use SHELL, External Command Defined in ACAD.pgp Set SHELL Bit Flag to 0 (Not Documented) to Wait to Return to AutoCAD