1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Beginning AutoCAD 2002 Episode 11 pot

30 186 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 30
Dung lượng 766,98 KB

Nội dung

Summary 1 Wblocks are global and could be accessed by all AutoCAD users. 2 Wblocks are usually saved to a named folder. 3 Wblocks are created with the command line entry WBLOCK <R> which results in the Write Block dialogue box. 4 Wblocks are inserted into a drawing in a manner similar to ordinary blocks, the user selecting: a) the named folder b) the drawing file name. 5 Wblocks can be exploded after/during insertion. 6 Unexploded wblocks become blocks in the current drawing. 7 All saved drawings are WBLOCKS. Assignment A single activity for you to attempt. Activity 37: Coupling arrangement. 1 Complete the drawing using your discretion for sizes not given. I have deliberately not given all sizes in this drawing. 2 Insert the wblock BORDER at 5,5 – full size with no rotation. 3 Insert the wblock TITLE at 412.5,7.5 and customise to suit. 4 Add all text and dimensions. 5 Save? WBLOCKS 293 Beginning with AutoCAD 2002.qxd 14/06/2002 19:08 Page 293 Attributes An attribute is an item of text attached to a block or a wblock and allows the user to add repetitive type text to frequently used blocks when they are inserted into a drawing. The text could be: a) weld symbols containing appropriate information b) electrical components with values c) parts lists containing coded, number off, material, etc. Attributes used as text items are useful, but their main advantage is that attribute data can be extracted from a drawing and stored in an attribute extraction file. This data could then be used as input to other computer packages, e.g. databases, spreadsheets, etc. for creating a Bill-of-Material, an Inventory for example. This chapter is only a ‘taster’ as the topic will not be investigated fully. The editing and extraction features of attributes are beyond the scope of this book. The purpose of this chapter is to introduce the user to: a) attaching attributes to a block b) inserting an attribute block into a drawing. Getting started The attribute example for demonstration is a fisherman’s trophy and will use a previously created and saved drawing. The fish ‘symbol’ will represent the block for adding the attributes. The added attributes will give information about the type of fish, the year it was caught and the river. 1 Open the C:\BEGIN\FISH drawing created during Chapter 34 and refer to Fig. 42.1. 2 Erase any centre lines, text and dimensions. 3 a) Move the complete shape from ‘the nose’ to the point 50,50. b) Scale the shape about the point (50,50) by 0.5 – fig. (a). c) Note that the 50,50 point is essential for positioning the text items. Chapter 42 Beginning with AutoCAD 2002.qxd 14/06/2002 19:08 Page 294 Defining the attributes Before a block containing attributes can be inserted into a drawing, the attributes must be defined, so: 1 Make layer TEXT current. 2 Menu bar with Draw-Block-Define Attributes and: prompt Attribute Definition dialogue box with selections for Mode, Attribute, Insertion point and Text respond with the following: 1. At Mode: leave all four options un-selected – no tick 2. At Attribute enter: a) Tag: SPECIES b) Prompt: What type of fish displayed? c) Value: ABCD 3. At Insertion point enter: a) X: 95; Y: 60; Z: 0 4. At Text options alter: a) Justification: scroll and pick Center b) Text Style: ST1 c) Height: 7 d) Rotation: 0 – dialogue box as Fig. 42.2 then pick OK. Attributes 295 Figure 42.1 Making and using attributes with the block TROPHY. Beginning with AutoCAD 2002.qxd 14/06/2002 19:08 Page 295 3 The attribute tag SPECIES will be displayed in the fish symbol as Fig. 42.1(b) 4 Activate the Attribute Definition command two more times and enter the following attribute information in the Attribute Definition dialogue box in the same way as step 2 First entry Second entry Attribute modes blank blank Attribute tag RIVER YEAR Attribute prompt Where caught? What was the year? Default value WXYZ 9999 Insertion Pt X 80 145 Insertion Pt Y 30 45 Insertion Pt Z 0 0 Justification Left Right Text style ST1 ST1 Height 5 5 Rotation 0 0. 5 When all the attribute information has been entered, the fish symbol will display the three tags – fig. (c). 6 Note: a) When attributes are used for the first time, the word Tag, Prompt and Value can cause confusion. The following description may help to overcome this confusion: 1. tag: is the actual attribute ‘label’ which is attached to the drawing at the specified text start point. This tag item can have any text style, height and rotation. 2. prompt: is an aid to the user when the attribute data is being entered with the inserted block 3. value: is an artificial name/number for the attribute being entered. It can have any alpha-numeric value. b) The Insertion point in the Attribute Definition dialogue box refers to the attribute text tag and not to a block. 7 In our first attribute definition sequence, we created the SPECIES tag with the following attribute information: a) Tag: SPECIES. b) Prompt: What type of fish displayed? c) Default value: ABCD. d) Text insertion point for SPECIES, centred on 100,55 with height 7 and 0 rotation angle. 296 Beginning AutoCAD 2002 Figure 42.2 Attribute Definition dialogue box. Beginning with AutoCAD 2002.qxd 14/06/2002 19:08 Page 296 Creating the attribute block 1 Menu bar with Draw-Block-Make and: prompt Block Definition dialogue box respond enter/activate the following: a) Name: TROPHY b) Base point: X: 50 Y: 50 Z: 0 c) Objects: Select and window symbol and attributes as fig. (d) then right-click d) Objects: Delete active e) Preview: Create icon from Block geometry active f) Insert units: Millimeters g) Description: TROPHY block with three attributes and dialogue box as Fig. 42.3 then pick OK. 2 The symbol and attributes have been made into a block and should disappear from the screen as we activated this option from the dialogue box. Attributes 297 Figure 42.3 The Block Definition dialogue box for TROPHY. Beginning with AutoCAD 2002.qxd 14/06/2002 19:08 Page 297 Testing the created block with attributes Now that the block with attributes has been created, we want to ‘test’ the attribute information it contains. This requires the block to be inserted into the drawing, and this will be achieved with both command line and dialogue box entries. 1 Make layer OUT current. 2 At the command line enter ATTDIA <R> and: prompt Enter new value for ATTDIA <?> enter 0 <R> 3 ATTDIA is a system variable, and when set to 0 will only allow attribute values to be entered from the keyboard. 4 At the command line enter –INSERT <R> and: prompt Enter block name and enter: TROPHY <R> prompt Specify insertion point and: pick any point to suit prompt Enter X scale and enter: 1 <R> prompt Enter Y scale and enter: 1 <R> prompt Specify rotation angle and enter: 0 <R> prompt What type of fish displayed?<ABCD> and enter: COD<R> prompt Where caught?<WXYZ> and enter: CLYDE <R> prompt What was the year?<9999> and enter: 1984 <R> 4 The fish trophy symbol will be displayed with the attribute information as fig. (e). 5 Note a) the prompt and defaults values are displayed as entered b) the order of the last three prompt lines (i.e. type, caught and year) may not be in the same order as mine. Don’t worry if they are not the same. 6 Now insert the trophy block twice more with –INSERT from the command line using: a) at any suitable point, full size with 0 rotation and accept the default values, i.e. right- click or <R> at the prompt line – fig. (f) b) at another point on the screen with the X scale factor as 0.75, the Y scale factor as 1.25, the rotation angle –5. Use the same attribute entries as step 4, i.e. COD, CLYDE and 1984. The result should be as fig. (g). 7 Explode any inserted block which contains attribute information and the tags will be displayed – fig. (h). 8 We are now ready to insert the ‘real’ attribute data. Attribute information The fisherman’s trophy cabinet contains five prime examples of what he has caught over the past few years, and each catch is represented in the trophy cabinet by the block symbol containing the appropriate attribute information. The attribute data to be displayed is: Species River Year SALMON SPEY 1995 TROUT TAY 1996 PIKE DART 1997 CARP NENE 1998 EELS DERWENT 1999. 298 Beginning AutoCAD 2002 Beginning with AutoCAD 2002.qxd 14/06/2002 19:08 Page 298 Attribute information can be added to an inserted block: a) from the keyboard – as previous example b) via a dialogue box which will now be discussed. 1 Erase all objects from the screen and make layer OUT current 2 At the command line enter ATTDIA <R> and: prompt Enter new value for ATTDIA<0> enter 1 <R> 3 Menu bar with Insert-Block and: prompt Insert dialogue box with Block name: TROPHY – from previous insertion respond 1. ensure all on-screen prompts not active, i.e. no tick 2. insertion point:- X: 40; Y: 230; Z: 0 3. scale: X: 1.2; Y: 1.2; Z: 1 4. rotation: angle 0 5. pick OK prompt Edit Attributes dialogue box with Entered prompts and default values as Fig. 42.4(a) respond 1. alter What type to: SALMON 2. alter Where caught to: SPEY 3. alter What year to: 1995 4. dialogue box as Fig. 42.4(b) 5. pick OK. 4 The trophy block will be inserted with the attribute information displayed. 5 Using step 3 as a guide with the attribute data listed above, refer to Fig. 42.5 and insert the TROPHY block to complete the cabinet – use your imagination with the scales 6 Complete the cabinet and save? This completes our brief ‘taster’ into attributes. Attributes 299 Figure 42.4 The Edit Attributes dialogue box. (a) (b) Beginning with AutoCAD 2002.qxd 14/06/2002 19:08 Page 299 Point of interest? In the previous chapter we created a title box as a wblock. This title box had text items attached to it, e.g. drawing name, date, revision, etc. These text items could have been made as attributes. When the title box was inserted into a drawing, the various text items (attributes) could have been entered to the drawing requirements. Think about this application of attributes! Summary 1 Attributes are text items added to BLOCKS or WBLOCKS. 2 Attribute must be defined by the user. 3 Attribute data is added to a block when it is inserted into a drawing. 4 Attributes can be edited and extracted from a drawing, but these topics are beyond the scope of this book. 300 Beginning AutoCAD 2002 Figure 42.5 The fisherman’s cabinet using block TROPHY. Beginning with AutoCAD 2002.qxd 14/06/2002 19:09 Page 300 External references Wblocks contain information about objects, colour, layers, linetypes, dimension styles, etc. and all this information is inserted into the drawing with the wblock. All this information may not be required by the user, and it also takes time and uses memory space. Wblocks have another disadvantage, this being that drawings which contain several wblocks are not automatically updated if one of the original wblocks is altered. External references (or xrefs) are similar to wblocks in that they are created by the user and can be inserted into a drawing, but they have one major advantage over the wblock. Drawings which contain external references are automatically updated if the original external reference ‘wblock’ is modified. A worked example will be used to demonstrate external references. The procedure may seem rather involved as it requires the user to save and open several drawings, but the final result is well worth the effort. For the demonstration we will: a) create a wblock b) use the wblock as an xref to create two drawing layouts c) modify the original wblock d) view the two drawing layouts. e) use the existing C:\BEGIN folder Getting started 1 Open your A3PAPER standard drawing sheet and refer to Fig. 43.1. 2 Make a new current layer with: name: XREF; colour: red; linetype: continuous. 3 Draw: a) a circle of radius 18 b) a item of text, middled on the circle centre with height 5 and rotation angle 0. The item of text is to be AutoCAD and is to be colour blue – fig. (a). Creating the xref (a wblock) 1 At the command line enter WBLOCK <R> and: prompt Write Block dialogue box respond 1. Source: Objects 2. Base point: Pick point and pick circle centre point 3. Objects: Select objects, pick circle and text then right-click 4. Objects: Delete from drawing active 5. File name: XREFEX 6. Location: C:\BEGIN 7. Insert units: Millimeters 8. pick OK. 2 A preview of the wblock will be displayed and a blank screen returned, due to the delete from drawing option being active. Chapter 43 Beginning with AutoCAD 2002.qxd 14/06/2002 19:09 Page 301 Inserting the xref (drawing layout 1) 1 Menu bar with File-Close (no to save changes) then menu bar with File-Open and select your A3PAPER standard sheet again with layer OUT current. 2 Menu bar with Insert-External Reference and: prompt Select Reference File dialogue box (looks familiar?) respond 1. scroll and pick C:\BEGIN 2. scroll and pick XREFEX 3. pick Open prompt External Reference dialogue box with Name: XREFEX and Path: C:\BEGIN\XREFEX.dwg respond 1. ensure Reference Type: Attachment (black dot) 2. Retain path active 3. all on-screen options active, i.e. tick 4. dialogue box similar to Fig. 43.2 5. pick OK prompt Attach Xref “XREFEX”: C:\BEGIN\XREFEX.dwg and “XREFEX” loaded then Specify insertion point and enter: 50,50 <R> prompt Enter X scale and enter: 1 <R> prompt Enter Y scale and enter: 1 <R> prompt Specify rotation angle and enter: 0 <R> 3 The named external reference (XREFEX) will be displayed at the insertion point entered. The complete process seems similar to inserting a wblock? 302 Beginning AutoCAD 2002 Figure 43.1 External reference example. Beginning with AutoCAD 2002.qxd 14/06/2002 19:09 Page 302 [...]... enter C – the centre text option b) centre point of text: 100,175 c) height: 5 and rotation angle: 0 d) text: AutoCAD , then Release then 2002 Figure 45.5 Model/Paper space exercise 2 317 Beginning with AutoCAD 2002. qxd 318 14/06 /2002 19:09 Page 318 Beginning AutoCAD 2002 Dimensioning in model and paper space When a multi-viewport layout has been created in paper space, many users... prompt Specify opposite corner enter 210,145 prompt Create Layout – Finish dialogue box respond pick Finish Figure 45.2 The Create Layout (Begin) dialogue box 311 Beginning with AutoCAD 2002. qxd 312 14/06 /2002 19:09 Page 312 Beginning AutoCAD 2002 4 The drawing screen will be returned in Paper Space (note icon) with: a) a white area – the A3 drawing paper b) a dotted line area – the plottable area c)... array the inserted attached xref with: a) centre point: 200,150 b) number of items: 11 c) angle to fill: 360 d) rotate items as copied active 4 Save the layout as C:\BEGIN\XREFLAY2 – Fig 43.1(d) Figure 43.2 The External Reference dialogue box 303 Beginning with AutoCAD 2002. qxd 304 14/06 /2002 19:09 Page 304 Beginning AutoCAD 2002 Modifying the original xref 1 Close the current drawing 2 Open the original... active b) Isometric snap active 4 set Grid Y Spacing: 10 5 set Snap Y Spacing: 5 6 dialogue box as Fig 44.1 7 pick OK Figure 44.1 The Drafting Settings dialogue box Beginning with AutoCAD 2002. qxd 306 14/06 /2002 19:09 Page 306 Beginning AutoCAD 2002 2 The screen will display an isometric grid of 10 spacing, with the on-screen cursor ‘aligned’ to this grid with a snap of 5 3 Use the Drafting Settings dialogue... each viewport 8 With the large rectangular viewport active: a) erase all text b) freeze layer DIMS 9 Any text and dimensions ‘disappear’ from all the viewports 313 Beginning with AutoCAD 2002. qxd 314 14/06 /2002 19:09 Page 314 Beginning AutoCAD 2002 Using the viewports 1 With the lower right viewport active select View-Zoom-Window from the menu bar and: prompt Specify first corner and enter: 5000,1500 ... active viewport e) the WORKDRG and the black border within the coloured viewport 5 Erase the coloured viewport and WORKDRG ‘disappears’ 6 Layer VP still current 315 Beginning with AutoCAD 2002. qxd 316 14/06 /2002 19:09 Page 316 Beginning AutoCAD 2002 7 Menu bar with View-Viewports-New Viewports and: prompt Viewports dialogue box with two tabs: a) New Viewports b) Named Viewports respond 1 New Viewports tab... @80 . 100,55 with height 7 and 0 rotation angle. 296 Beginning AutoCAD 2002 Figure 42.2 Attribute Definition dialogue box. Beginning with AutoCAD 2002. qxd 14/06 /2002 19:08 Page 296 Creating the attribute. 1995 TROUT TAY 1996 PIKE DART 1997 CARP NENE 1998 EELS DERWENT 1999. 298 Beginning AutoCAD 2002 Beginning with AutoCAD 2002. qxd 14/06 /2002 19:08 Page 298 Attribute information can be added to an inserted. are beyond the scope of this book. 300 Beginning AutoCAD 2002 Figure 42.5 The fisherman’s cabinet using block TROPHY. Beginning with AutoCAD 2002. qxd 14/06 /2002 19:09 Page 300 External references Wblocks

Ngày đăng: 13/08/2014, 15:21