Join Scott Onstott for an in-depth discussion in this video Applying dimensional constraints within a block, part of Designing Dynamic Blocks in AutoCAD.
- View Offline
- In this video, we'll design a dynamic block that uses dimensional constraints. Start by drawing a rectangle from some arbitrary location down here and then type 1000 tab, 400 enter. Select the rectangle by clicking on it and type B for Block and press enter. Let's give this block the name Constrained. Pick a point in the lower left corner. Choose to Convert this to block and check Open in block editor.
Click OK. So here's the rectangle in the Block Editor environment. If you don't see the Authoring Palettes, you can toggle them on right here. Go to the Constraints tab and scroll all the way down to find these Constraint Parameters. These are called dimensional constraints. They're also available up here, on the Dimensional panel, in this area. So let's begin by creating a horizontal dimensional constraint. Click the first constraint point right here.
You'll see a red target appear over potential constraint points. Specify the second point over here and then click another point above, to locate the dimension line, and finally, press enter. This constrains the geometry, and it gives you a custom grip that you can use to edit the dynamic block. Let's close the Block Editor and save the changes. Click on the object, and now you can tell that it's a block because it has a single grip down here, and it also has this custom dimensional constraint grip.
Test it out. See what happens. Click that and move it left or right. It lets you change the shape of the object. Select your object, right-click, and choose Reset Block to have it go back to its rectangular form. Let's go back into the Block Editor. You can do that in two different ways. You can either type Bedit, enter, and select it here from the list, or you can preselect it, right-click, and choose Block Editor.
Let's make a vertical constraint over here. Click on the top, the bottom, and then click a point over here on the right and press enter. This time, instead of closing out of the Block Editor and testing it in model space, we can actually test the block within the Block Editor environment if you click right here. This is now a block reference, and we have the grips that we can use to test drive it. Try this top grip again, and you'll see that it has unexpected behavior.
This grip works a little bit more like you might expect, but this is quite typical of the process when you're constraining objects. In the next video, you'll learn how to add geometric constraints that makes this block work in a much more practical way.
- Defining and nesting blocks
- Inserting and redefining blocks
- Creating and applying constraints
- Designing dynamic blocks
- Sharing blocks on a local area network