AutoCAD blocks are great. There are several different types: Static (regular blocks), attributed, and dynamic. Each one has its purpose, role, and place. A static block is simple and straight forward. What you see is what you get. An attributed block has text fields where you can enter in data. This data can be stored in the block, displayed, or both. That data can also be extract acted. Dynamic blocks are easily changed. They have been “programmed” to be altered through grip edits. This makes dynamic blocks very diverse and extremely useful.
How do you get your blocks, regardless of type, to display the way you want them to while using a minimum amount of unique blocks? Let’s say that I am redeveloping a residential area. Some construction has been done in the past but I am also going to add new features and structures. Right now there are fire hydrants that have been installed. Some of the existing fire hydrants will remain. Some will be removed. Other will be removed and used elsewhere and we will be installing brand new hydrants. We have four different types of hydrants that we want to visually display in our drawings.
- Existing
- Existing to be Removed
- Existing to be Removed and Reused
- New
Here are our options.
- We can make four different blocks.
- We can make a Dynamic Block (essentially making 4 blocks into 1).
- We can make One block and use layers to control the visual display.
I recommend making one block and using layers to control the display. There are several reasons for my recommendation:
- I only need to make one block.
- Since the blocks are on different layers, I have the most control of when the hydrants will be displayed.
- Since the blocks are on different layers I have complete control on how the hydrants will look at any time.
- If I need another hydrant type I only make a new layer.
- If how I’m using the hydrants I only change their layer.
There are three setting types to use to control the display values of blocks. Let’s look at color. All other object properties (linetype, linetype scale, line weight, transparency, thickness) have the same option types so apply these principals to them. The three options are:
- Retain the original color properties of the linework in the block.
- Inherit the color properties from the current layer the block is inserted on.
- Inherit individual color properties first, then the layer properties if they are different.
There are different ways to accomplish these goals. If we always wanted our hydrant to be RED then we can either set the linework in the block as RED or we draw the linework on a layer that is RED. Then we do nothing but place the block where we want it. But that’s not what we want to do. We want to draw the hydrant once and switch the color via layer control. We can change the color of the hydrant layer but we want our hydrants to be displayed in four different colors. In order to do that, we are left with the last two options. They are known as Bylayer or Byblock. Instead of assigning the hydrant lines to a color we need to set the color (and all other properties) to either Bylayer or to Byblock. (quick tip: when in doubt go Bylayer.) Bylayer and Byblock will inherit the properties from the layer the block is inserted on. If we insert our hydrant block on a layer with a color set to red, the hydrants will be red. Change the layer color and all of the hydrants on that layer will also change. That’s what we want to do. Now we can create four different hydrant layers, each set to a different color (and linetype). That gives us complete control of how the hydrants are shown in each drawing. I can freeze some of the layers, in order to not display them, and I can make some hydrants darker, thicker, or even dashed.
There are a few things to remember when using Bylayer and Byblock. A block’s linework that is set to Bylayer must be drawn on layer 0 (zero). If so then the block will inherit the properties of the layer the block is set to. If the block is on a specific layer and set to Bylayer then the block will only display according to the properties of that layer. However, if the linework in the block is drawn on a specific layer and set to Byblock, then the block will inherit the properties of the layer that the block is inserted on. It looks to the block for the properties not the line work of the block. This also means that you can change the color of the block without using the layers or the linework. Byblock gives you the most control.
Assume that the block’s linework is on a layer named RED and that layer’s color is RED. Set the line work’s color to Byblock. Insert the block on any other layer and the block will inherit the properties from that layer. Select the block, open the properties pallet (CTRL+1) and change the block’s color to green. It changes to green. Change the block’s color back to Bylayer. Open the Layer Manager (type LA) and change the layer’s color to Magenta. The block is now magenta. Now, freeze the layer the block is on. The block disappears. Thaw the layer. Now freeze the layer the block’s linework is on. The linework freezes. If your layer is Byblock you can freeze the linework layer or freeze the block layer. If your linework is Bylayer, you can only freeze the block layer. Freezing layer 0 (where your Bylayer linework is drawn) does nothing. Byblock give you more levels of control but Bylayer keeps things simple. In our case use either one but perhaps you should consider Byblock.
Using blocks is about making things easier. Making drawings is the easy part. It takes as long as it takes. But if I make my drawings in a way that allows easy and quick edits then I save much time in the life of the project. Regardless of which type of blocks you use always plan ahead and try to future proof your drawings as much as possible.
Good overview of blocks, don't forget about annotative blocks, they're also very useful.
ReplyDeleteThank you. I wanted to focus on the differences between Bylayer and Byblock. But yes I did forget annotative blocks. They are very useful too!
ReplyDelete