Join Shaun Bryant for an in-depth discussion in this video Creating a basic dynamic block, part of AutoCAD: Tool Palettes.
- [Narrator] OK, so we're starting another chapter now in Using Tool Palette in Autocad, and in this particular chapter, it's part one of three chapters, where we're going to develop our Tool Palette. Now, in part one, we're going to develop a dynamic block and we're actually going to set this up on our Tool Palette and utilize Design Center to do so. So, what I've got is a new drawing, 07_Developing_Part1.dwg. So this is part one, this is the chapter that is part one of Developing the Tool Palette, just so that you know.
You can download the drawing from your Lynda.com exercise files as usual, and what you'll notice is I've got a little rectangle and a little arc there that form a door, and they're on layer zero. So, what I'm going to do now is, I'm gonna to go to the layers, here, on the Home tab on the ribbon, and I'm gonna go to Layer Properties and create a new layer. And that new layer is going to be called "Doors", like so. And I'm gonna give it the color red, I'll just make sure the Select Color dialog is down in the middle for you, there, red there, OK then.
Now, what I'm going to do is make sure that my current layer is now "Doors" and close the Layer Properties manager. And then what I can do, when I create the block and I make it into a dynamic block, I can then make sure that it always adopts the current layer that we're working on, in this case which will be the "Doors" layer. So, I need to make this into a dynamic block, so I'm gonna use the block editor. Now, the quickest way to do this is to make it into a block first, and then just double-click on it and it opens it up in the block editor. It's quick and easy that way.
So, let's make a block of it first. I'm in the Home tab on the ribbon, there's the Block panel, and I'll want to create a block. So, the Block Definition is just going to be "Door", and I'm going to put a dash, and it's a 900 millimeter door in this case, it's a metric drawing. And I'm gonna pick a Base Point, like so, and I'm gonna use that corner there as an endpoint snap. I'm gonna click on Select objects, click, drag, select all the objects that make up the door, right-click to confirm. I am going to convert to a block in this case, which will put it onto the Objects layer.
That doesn't matter, that's fine. Make sure that you can scale uniformly and allow exploding and then I'm going to open it in the block editor. So when I click on OK, as you can see, I'm now in the block editor, and what I'll do is I'll bring in the Block Authoring palette now, which is right here. And all I'm going to do is, I'm going to add a little flip parameter and action here, so I'm gonna go to Parameters, like so, and there's my Flip parameter there, so I come in, and it now wants me to add a Flip parameter to this particular block.
So I click on Flip, like so, and it asks me for a Base Point of the reflection line. I'm gonna hold down Shift now, and right-click and use Mid Between 2 Points, and I'm just gonna pan up a bit and I'll wanna go from that point to that point, and then drag vertically upwards and click like that, and there's my flip state1, and I'll just pop that name, flip state1, over here somewhere like that. Now, I've got a little exclamation mark there; there's my flip, so I can flip the door each way, but I need to add an action to that now as well.
So I go for my Flip action, and I select the parameter, which is my flip state1, like so, and select all the objects, like so. So click, drag, select everything, right-click to confirm, and you can see the exclamation mark disappears. Now, what I'm going to do is close the block editor on the ribbon, and it'll prompt me now, do I want to save the changes to "Door-900mm"? Yes, I do. Now, you see, if I click on it now, it's got a little flip parameter, and that just flips to either side. Very, very simple dynamic block.
Now, what I'd like to do is just hit Escape to de-select, and then make sure that you save your drawing at this point, because you wanna save what you've done with that particular dynamic block. So I'm just gonna click on Save, and then when we start thinking about palettes, the drawing is saved, and we can add that to our new palette in the Tool Palettes.
- Using tool palettes
- Using AutoCAD DesignCenter
- Finding and inserting blocks
- Creating tool palettes from DesignCenter
- Setting up tool palettes with styles, hatches, and DWGs
- Adding blocks and groups
- Importing and exporting tool palettes