Wednesday, October 17, 2007

The ByBlock Property

Here's a little tip that borders the edge of extreme AutoCAD nerd: the ByBlock property.

First, some background:

The default property for a new entity is the ByLayer property. This applies to the Color, Linetype, Lineweight, and PlotStyle properties. This means that the entity gets these properties from the layer on which it resides. If you move an entity to another layer, it inherits the new layer's properties.

You can override an entity's ByLayer property and give it an explicit value. For example you might select a line and make its color Green regardless of the color of the layer. Consider the following example. In the first image all entities are drawn on Layer A-WALL-FULL which has a Color of 2, Linetype of Continuous, and Lineweight of 0.35mm. The second image shows the same entities when moved to Layer A-WALL-JAMB which is Color 1, Ltype Continuous, and Lineweight 0.25mm. The last image shows what happens when the properties of the line are assigned explicitly.

Lost yet? Let's further complicate this by introducing nested entities, i.e., entities within blocks. If an entity in a block is created on layer 0, it inherits the properties of any layer the block is then inserted on. If the entities in a block are created on any layer other than 0, they retain the properties of that layer. If entities in a block are given explicit properties, they retain those properties regardless of the insertion layer.

And, finally, we come to the reason for this discussion, the ByBlock property! Let's draw some entities on layer 0 and make a block of them. We will leave all the entities of the block with the default ByLayer properties except for one entity. To this entity we assign a Color and Plot Style of ByBlock.

What's happening here? The first image shows the settings of the entities that make up the block. The second image shows this block inserted on layer G-ANNO-TEXT. Note how the entities within the block take on the properties of the layer. In the third image we select the block and change its Color to 8 and its Plot Style to 40 (which is 40% black according to our pen table). Notice that only the upper sweep changed. It was the only entity in the block definition that had a ByBlock property, so it alone took on the properties that we assigned explicitly to the block. The other entities had a ByLayer property and so retained the insertion layer properties. Also notice that the ByBlock property behaves just like ByLayer until you actually assign a property to the block.

All of the Benham title blocks were created to behave in this manner. So, no matter what layer standard or pen table are required by the project, we can still get the Benham logo to plot correctly by changing the properties of the block. There's never need to explode or redefine anything.


At 12:30 PM , Anonymous Rockmaster J said...


Great article, thanks!


At 3:45 AM , Anonymous Anonymous said...

Ward - Its nice to read in detail about the concept of ByBlock property. Thank you!

Tom Kelly

At 1:43 AM , Blogger aa said...

This comment has been removed by a blog administrator.


Post a Comment

Subscribe to Post Comments [Atom]

<< Home