550 likes | 777 Views
ENGT 122 – CAD I. Chapter 16 - Blocks. What’s a Block?. Block - A set of objects grouped, named, and saved as a single object for later retrieval ( BLOCK ). Can be repeatedly inserted into a drawing at any time ( INSERT ).
E N D
ENGT 122 – CAD I Chapter 16 - Blocks
What’s a Block? • Block - A set of objects grouped, named, and saved as a single object for later retrieval (BLOCK). • Can be repeatedly inserted into a drawing at any time (INSERT). • Comprised of any number of objects, but treated as a single object that can be easily moved, rotated, scaled, and copied.
What’s a Block? • Individual objects comprising a block can be “recovered” using the EXPLODE command. • An inserted Block is referred to as a “Block Reference”. • Once created, a block can be modified (redefined), and all inserted block references will update accordingly. • Blocks can be “nested” within other blocks.
Some Advantages of Blocks • Allows a previously created drawing or portion of a drawing to be reused in the same drawing or another drawing without recreating it. • Allows extensive libraries of symbols and parts to be created, stored, and accessed at any time. • Reduces drawing time. • Assures standardized symbol conventions and part dimensions within the organization.
Some Advantages of Blocks • Greatly simplifies drawing changes. • Example: an assembly has 150 similar bolts. If the bolt specification changes, the block definition can be easily edited and the assembly will update to reflect the change on all bolts. • Greatly reduces drawing file size. The objects comprising a block are only stored once, during definition of the block. Each block insertion is merely a reference to the original block definition (ex: 150 block insertions of a bolt require little more storage requirements than a single bolt).
Block Example: • Standardized electrical symbol library can be created from Block entities and later used to create circuit diagrams.
DEMO 1: • Load file Demo1.dwg. • Show example of electrical symbol Block insertion
Learning Objectives • Create blocks with the BLOCKcommand. • Insert blocks with the INSERT command. • Split a block into individual objects using the EXPLODE command. • Learn to redefine a block. • Create drawing files using the WBLOCKcommand. • Redefine the insertion base point for a drawing. • Rename blocks and purge unused blocks.
Creating Blocks • Step 1: Draw the objects to be grouped in the block using AutoCAD drawing commands, but note; • When inserted, each entity in the block will retain the properties of the layers it was created in or inherit the properties of the current layer according to the table below:
Creating Blocks • Step 2: Make sure the objects to be placed in the block are visible. Then, issue the Make Block Command using command line, ribbon, or toolbar. Command:BLOCK • All methods bring up Block Definition dialog box. Draw Toolbar
DEMO 2: • Open file Demo2.dwg. • Create some geometry: • All on colored layers • Some on colored & some on zero layer • All on Zero Layer • Demonstrate Make Block Commands and Block Definition dialog box; • BLOCK
Exercise 1: • Start a new drawing using an English template. • Set the current layer to Layer 0 and then create the simplified bolt shown. When inserted, this block will inherit the properties of whichever layer is current. • Using the bolt geometry, create a block named BOLT. • The base point should be at the location indicated. • Use the Delete option for the selected objects. The bolt will disappear, but don’t fret, it is safely stored. • Save your file as Ex1.dwg. You will need it later. Base Point at midpoint
Inserting Blocks • Step 3 – Once created, the block is stored locally in the current drawing file. • To insert a copy of the block, use INSERT command. • Each block will be placed on the layer that’s current during INSERT…so set the current layer as necessary before using INSERT; • All objects originally created on a layer other than “Layer 0” will retain their original layer properties. • All objects created on “Layer 0” will inherit properties from the current layer. • Freeze/Thaw will control visibility of entire block. On/Off controls visibility of individual block entities.
Inserting Blocks • Inserting a Block – Command:INSERT • Insert dialog box appears Draw Toolbar: Insert Block
Inserting Blocks • Insert dialog box allows; • A predefined block to be inserted, or • A drawing file (.dwg) to be inserted as a block.
DEMO 3: • Show the INSERT command using block made in Demo 2. Illustrate inserting; • A predefined block • An external file Demo3.dwg (title block) as a block.
Exercise 2A: • Use the same drawing file from Exercise 1 (Ex1.dwg) and create the geometry shown using a new layer called JOINT with color = Magenta. • Then create a new layer called BOLTBLOCK using color = Green, linetype = continuous, linewight = 0.7. • Set the current layer to Layer BOLTBLOCK.
Exercise 2B: • Use the INSERT command to insert 3 copies of your block named BOLT as shown below. • Notice the blocks inherit the properties of the current layer (BOLTBLOCK ). Why? • Save your file as Ex2.dwg. You will need this later.
Editing Block Definitions • A bock is treated as a single object, but is comprised of multiple objects. • To change or “Redefine” a block, you must first “Explode” it to break it into its components. • Use the INSERT command with the Explode option to insert the block in an exploded state, or… • Insert the block normally and use the EXPLODE command. Command: EXPLODE Ribbon: Modify > Explode Modify Toolbar: Explode
Editing Block Definitions • Once in the exploded state, the individual objects comprising the block can be modified. • After making the required changes, the block can be “Redefined” as follows; • Reissue the BLOCK command. • Reselect the objects comprising the block. • Reselect the same base point. • Select the original block name AutoCAD will issue a warning, “Block is already defined, Do you want to redefine it?” Select “YES”. • The block is now redefined and incorporates the changes you made. All blocks inserted previously with this name will update accordingly! Wowee!
DEMO 4: • Open Demo4.dwg. • Insert an exploded version of diode. • Redefine diode and view update. • Insert a non-exploded version of resistor. • Use EXPLODE to explode resistor. • Redefine resistor and view update. • Show effect of rotating original and choosing wrong basepoint.
Exercise 3A: • If not currently open, reopen drawing Ex2.dwg which you saved in the previous exercise. • Away from the existing objects, insert a copy of your block named BOLT and then explode it with EXPLODE. • Use STRETCH to increase the length of the exploded bolt by 2”. • Then set the current layer to layer 0 and add some simple threads using COPY, ARRAY, or OFFSET. Exploded Bolt block
Exercise 3B: • Redefine your block called BOLT using the modified bolt geometry. Use the Retain option for selected objects, and use the same base point as previously. • Respond YES to the message Bolt already defined, do you want to redefine it? • Your bolts should all update as shown. Base Point at midpoint
Nested Blocks • Nested BlockIf the BLOCK command is issued to create a block, and another block is selected as one of the objects within the new block, a nested block is formed (one within another). • The depth of nesting is unlimited.
DEMO 6: • Load Demo6.dwg. • Show Nested block. • Create a small circuit using existing blocks. • Convert circuit into a larger block with nesting.
WBLOCKS • Blocks are stored locally in the drawing file they were created in and are not directly accessible in other drawings. • The WBLOCK command (called Write Block) overcomes this deficiency. • Any drawing file can be inserted as a block. • WBLOCK glorified save command that creates a drawing file from objects in your current file. • selected objects • predefined block (will be in exploded state) • or the entire drawing • These new drawing files can then be INSERTed as blocks in any other drawing file.
WBLOCKS To Create a WBLOCK: • Command:WBLOCK Displays Write Block dialog box.
DEMO 7: • Load file Demo7.dwg. • Show the WBLOCK command using; • A predefined block • Entire drawing • Selected objects • Show WBLOCK insert.
Exercise 4A: • Open a new English drawing. • Create a layer called SMALLBOLT (color = green) and create the small bolt shown below on this layer. • Create a layer called BIGBOLT (color = blue) and create the big bolt shown below on this layer using COPY and STRETCH. • Create the nut shown below on the 0 (zero) layer.
Exercise 4B: • Create a WBLOCK named SmallBolt using the geometry and base point indicated. Save it where you can find it! • Create a WBLOCK named BigBolt using the geometry and base point indicated. Save it where you can find it! • Create a WBLOCK named nutusing the geometry and base point indicated. Save it where you can find it! • Save your file as Ex4.dwg and close it. Base Point at midpoint Base Point at midpoint Wblock named SmallBolt WBlock named BigBolt WBlock named Nut Base Point
Exercise 4C: • Open a new drawing file and create the geometry shown below on the 0 (zero) layer. • Then create a new layer called RED (color = red). • Make RED the current layer.
Exercise 4D: • Use INSERT to insert block Smallbolt shown in green. • Use INSERT to insert block Bigbolt shown in blue. • Use INSERT to insert two blocks Nut shown in red. • Select each block individually and identify what layer it is on. Each block should be on layer RED since that layer was current when each block was inserted. • Since the bolts were created on non-zero layers they retain their original color. The nuts were created on layer 0 and therefore acquire the properties of the current layer, RED.
Defining Base Points • When a drawing file (say a resistor from a library of electrical components) is used for block insertion, the base point defaults to the drawing origin. • If the file is frequently used as a block, it’s desirable to reset the base point to a specific location. • BASE command accomplishes this. • Open the drawing file to be used as a block. • Issue the BASE command; Command:BASE • Select a new base point and resave the file.
DEMO 8: • Open file Demo8A.dwg and show contents. Then close it. • Open file Demo8B.dwg and Insert Demo8A.dwg as a block with original BASE. • Edit the BASE in Demo8A.dwg using the BASE command, then save it. • Insert Demo8A.dwg as a block with new BASE.
Editing WBlock Definitions • Redefining an externally referenced block (one from another file) will update the block locally but not in the source file. • WBLOCKS and Drawing files used as blocks should be edited directly in the source file and re-saved.
Renaming Blocks • A block can be renamed using the RENAME command: Command: RENAME • Rename dialog box displays. • Select the name to change. • Enter a new name and pick the Rename To button. • Select OK. • Rename can be used for other entities too.
DEMO 9: • Open Demo9.dwg. • Rename some of the blocks. • RENAME can be used for other entities.
Deleting Unused Blocks • To remove unused blocks from the drawing use the PURGE command. Application Menu: Drawing Utilities > Purge… Command: PURGE • Purgedialog box displays. • Expand the tree labeled Blocks. Only unused blocks will be visible. • “Non-purgable” items can be viewed by selecting view items you cannot purge. • Nested blocks can be purged by selecting Purge nested items. PURGE can be used for other entities too!
DEMO 10: • Open Demo10.dwg. • Delete all blocks then insert a couple blocks. • Show the PURGE command. • PURGE can be used for other entities.
Block: POLYGON Block: CIRCLE Block: RECTANGLE Exercise 5: • Create the objects shown (any layer). Then generate a block for each using the name indicated and the Delete option. • Insert a copy of each block. • Rename the blocks as follows: CIRCLEROUND; RECTANGLEBOX; POLYGONHEX • Try to PURGE the blocks. • Delete the inserted blocks, then try PURGE again.
Creating Blocks • Step 1: Create the objects to be grouped in the block using AutoCAD drawing commands, but note; • When inserted, each entity in the block will retain the properties of the layer it was created in or inherit the properties of the current layer according to table below:
Basepoint Inserting Blocks Affect of Scale Factor: • Block can be mirrored during insertion by using a negative scale factor. • If X-Scale negative mirrors about Y-axis. • If Y-Scale negative mirrors about X-axis.
Nested Blocks • Nested BlockIf the BLOCK command is issued to create a block, and another block is selected as one of the objects, a nested block is formed (one within another). • The depth of nesting is unlimited. • Special rules for how layers, colors, and linetypes are affected in a nested block: • If an inner block has objects on Layer 0, or objects with linetype or color specified BYBLOCK, the objects acquire the properties of the first fixed layer encountered in a higher level nest. • If no fixed layers are found, the Layer 0 and BYBLOCK objects acquire color = white, linetype = continuous, line weight = default.