How to create AutoCAD Blocks to reuse standard geometry
January 2010 | Filed Under: AutoCAD Tutorials
Autocad Blocks are a great way of creating standard symbols. Blocks can also be used for creating details of standard items such as bolts or screws. Blocks are often used for Title Blocks and Borders.
In this introduction to AutoCAD blocks I aim to briefly cover the following:
- What is a Block?
- Planning your Block
- Creating Blocks
- The Block Editor
- Inserting your blocks
- Deleting (Purging) block definitions
What is a Block?
AutoCAD blocks are a way of collecting geometry together into one object which you can use repeatedly in your drawings. Unlike AutoCAD’s Groups If you change the geometry that is contained within a block all copies of that block will also update. Unlike groups you cannot change the geometry in one block without changing all the copies of that block.*
Block Definitions and Instances
AutoCAD Blocks have two parts. A block ‘Definition’ and a block ‘Instance’. A copy of a block is know as an ‘instance’ of a block definition. The block definition is stored in the magical ether of your drawing file. You can access the block definition via any instance of that block. If you edit a block you are editing the block definition and all instances of that block will change.
A block definition can contain any number and any kind of entities i.e. Lines, arcs, circles, text or even other blocks. Each entity could be on any layer and could have different colour, line weight and line type properties.
Blocks can also contain Attributes. An attribute is a label or tag that contains information. The Attribute definition is contained within each block, but the information that the attribute holds can be different for each instance of that block. Attribute information can be extracted to a table or excel spreadsheet to form a schedule or a bill of materials.
The look of your Block
Your block will always be inserted on the current layer. You can move your block to any layer you wish. The block definition will retain the information about the original layer, colour, and line type properties of the entities that are contained within your block.
You have the option to decide whether the block will always look the same, no matter what layer it is on, or whether it is possible to change each instance of the block to have different properties, or whether the block should inherit the properties of the layer it is currently on.
Planning your block
Before you create your Block you should consider the following points. Each block needs a unique name, an insertion point and usually contains some entities.
If you want any of your entities in the block to retain their original properties, put your entities on any layer apart from Layer 0 and make sure that any of the properties of the objects that you want to retain are not set to ‘BYBLOCK’ or ‘BYLAYER’.
If you want any of your entities in the block to Inherit their properties from the current layer, put your entities on Layer 0 and make sure that the properties of the objects are set to ‘BYLAYER’.
If you want any of your entities in the block to be independently changeable, put your entities on any Layer and make sure that the properties of the objects are set to ‘BYBLOCK’.
You have a few different options for creating blocks;
- Copy and paste
- ‘BLOCK’ command
- ‘WBLOCK’ command
- Via the block editor
Copy and Paste (Down and dirty).
Select the entities you want to turn into a block. Right click and choose ‘Cut’ (Windows shortcut Ctrl + X), right click again and choose ‘Paste as Block’ (Ctrl + Shift + V). Autocad will take care of the rest.
Note: I don’t recommend this technique if you want to reuse your blocks or share them with others!
The ‘BLOCK’ command
To define a block for the current drawing
Create the entities you want to use in the block definition.
Click Home tab > Block panel > Create.
Tool bar: Draw
Command entry: BLOCK
- Name your block.
- Pick an insertion point.
- Pick the entities you wish to include in your block.
- Add a little extra information, if you want.
The block is now defined in the current drawing and can be inserted at any time. If you picked the ‘Convert to block’ option under ‘Objects’ your original geometry will have also have been converted to a block.
The ‘WBLOCK’ command
The ‘WBLOCK’ command creates a new drawing file from the objects you have selected. This drawing file could then be inserted as a block. This is a useful tool if you want to share your blocks with others.
Command entry: ‘WBLOCK’
- Pick a base point.
- Pick the objects you wish to write out .
- Add a file name and path for your new drawing file.
- Click OK.
A new drawing is created with the selected objects. This drawing can now be inserted as a block.
The Block editor
The Block Editor is a separate environment in which you can create and edit your blocks. The Block Editor is a key part of creating dynamic blocks. The block editor is a fantastic tool and deserves an explanation all of it’s own, so I won’t bang on about it in this post.
Ribbon: Home tab > Block panel > Edit.
Menu: Tools > Block Editor
Shortcut menu: Select a block reference. Right-click in the drawing area. Click Block Editor.
Command entry: ‘BEDIT’
Note: When using the ‘BLOCK’ command there is an option to open your brand new block definition in the block editor.
To use the block editor, either create your block using the ‘BLOCK’ command, and check the ‘open in block editor’ option, or just fire up the block editor, type in a name for your new block and begin creating your block from scratch.
When you’re done choose ‘Save block’ to save your new block definition or ‘Save as’ to create a copy of your block definition with a new name.
In the block editor the insertion point is represented by the origin (0,0). Moving your geometry relative to the origin will move the insertion point of your block.
Inserting your Block
If you have created a block in you drawing the simplest way to use it is to copy and paste it. If you have a block that you will use a lot you can copy it into your template file. You can then delete all the instances of your block in your template file, and although you can’t see it, the block definition will be retained. You can use the ‘Insert’ command to insert an instance of your block when you need it.
If you want to use a block that is defined in another drawing file, I recommend that you use the ‘Design centre’ – also a topic large enough for a separate post.
Click Home tab > Block panel > Insert.
Command entry: ‘INSERT’
- In the ‘Name’ box, select a name from a list of block definitions that are in your current drawing, or hit the browse button to insert another drawing as a block definition.
- 3. and 4. If you want to use your mouse to specify the insertion point, scale, or rotation, check the ‘Specify On-Screen’ boxes. Otherwise, enter values in the Insertion Point, Scale, and Rotation boxes. Finally Click ‘OK’ to insert your block.
Deleting (Purging) block definitions
If you want to make the geometry within the block independent again you can ‘Explode’ the block. To get rid of a block definition completely you will need to delete (or explode) all instances of that block, and then purge the block definition from the drawing.
Ribbon: Home tab > Modify panel > Explode
Menu: Modify >
Command entry: ‘EXPLODE’
To remove a block definition, first delete all instances of that block.
Click File > Drawing Utilities > Purge.
The Purge dialogue box displays a tree view of named objects that can be purged.
To purge your block double-click ‘Blocks’ to expand the Block tree view. Select the block to be purged.If the item you want to purge is not listed, select ‘View Items You Cannot Purge’, if your block is in this list you haven’t deleted all the instances of your block.
You are prompted to confirm each item in the list. If you do not want to confirm each purge, clear the Confirm Each Item to Be Purged option.
To confirm the purging of each item, respond to the prompt by choosing Yes or No, or Yes to All if more than one item is selected.
Command entry: ‘PURGE’
Using blocks effectively requires a bit of work up front. You will need to spend a little time creating and storing your blocks to make them effective. However once you have a decent ‘Block Library’ established you will be saving time on every drawing.
*Unless your block is Dynamic – that’s next week…
Looking for something more flexible? Read up on AutoCAD Groups.