Beschreibung
Wichtige Erkenntnisse
- Learn how to create Dynamic Blocks that can stretch, mirror, array, rotate, align, and have multiple insertion points
- Learn how to limit block variations through lists, increments, block tables, and lookup actions
- Learn how to apply constraints and parameters to control block behavior
- Learn how to extract dynamic block properties to AutoCAD tables and Excel spreadsheets
Referent
- Tracy ChadwickTracy Chadwick serves as coordinator and instructor for the Computer Drafting Technology program at Hutchinson Community College (HCC) in Hutchinson, Kansas. He is responsible for teaching a wide range of courses, including those on engineering graphics, AutoCAD software, Inventor software, and Revit Architecture software. In 2007, Autodesk, Inc., recognized Chadwick with the North America Award for Distinguished Performance in AutoCAD Software Training. Tracy, along with his co-author Rick Ellis, recently published his first book, A Practical Guide to AutoCAD 2020.
TRACY CHADWICK: Good afternoon, everybody. My name is Tracy Chadwick, and thanks for being patient. We're starting a couple minutes late. We had a little bit of technical difficulties, so thanks to our technical staff.
I'm here to talk to you about dynamic blocks. I know this is the last class of AU, so I appreciate you guys sticking around. We're going to talk a lot about dynamic blocks today. Before I do, just a little bit of introductions here.
First of all, who am I? I've used AutoCAD for about 20 years, starting at the community college which I actually teach at now, Hutchinson Community College. I started as a student there about 20 years ago, and started on release 13. Actually as the older versions on some CNC machines and things like that. So I've used AutoCAD for a while. I love AutoCAD. I love efficiencies. That's one of the reasons why I love dynamic blocks. It just can increase your efficiency so much if you use them in your block libraries.
I've taught for 15 years. I've been at Hutchinson Community College that full time. Started out as an ATC, an Autodesk Training Center, and I did a lot of corporate training. And now I coordinate and teach in our associate's degree program.
This is my fourth year speaking at Autodesk University. I'm fortunate to be able to come back and enjoy speaking with you guys. A little bit of personal stuff, I've been a dad for 10 years. That really defines me. And I've also been a Star Wars geek for life. So hopefully there are some other Star Wars geeks out there. There's my girls, clearly a Twilek and a Mandalorian. I'm sure you guys all know that. So those are my girls.
So I want to kind of get a feel for who you guys are. How many of you fall into this category? You've already used some dynamic blocks. You've created them, but you're looking for some tips and tricks. Show of hands? So quite a few. All right. How about never created a dynamic block. I'm here to do it for the first time. So few of those as well. OK, not quite as much. Anybody fall in this category? Class is already full? No? OK All right.
Well, hopefully everybody gets something out of this. Again, those of you that have used it for a while, hopefully you get some tips and tricks, maybe even just that one gem that you can take back and use. And for those of you that are completely brand new, hopefully you'll enjoy this class and be able to take this back and do this at work.
So just a feel for the industries. How many of you are kind of in the building industry, architectural, structural, interior design, that sort of thing? All right, about a third. Manufacturing industry, mechanical, electrical? About a third. Civil? Quite a bit. Other that I didn't mention? So a few. All right.
Well, what I'm going to do today is really teach you tools and techniques. So I've got a few examples that might be mechanical, might be civil, might be architectural, but don't focus on the actual exercise too much. Just focus on the tools and tips and techniques that I'm giving you. And my hope is that you can take those back to your office and be able to create dynamic blocks and hopefully increase some efficiency.
So I'm sure you guys have a good idea of dynamic blocks since you're here. But if you have a block library, and you have several different blocks and you want to reduce the size, dynamic blocks is one way that we can do that. If you have slight variations of blocks, maybe different sizes or different little features, we can put those together into a dynamic block.
So by the end of class today, you are going to be able to create dynamic blocks with all these abilities. So I'm going to talk about stretch. I'm going to talk about mirror, array, rotate, align. Be able to create multiple insertion points. So we'll look at a bunch of different tools.
We'll also look at how we can limit those. So instead of just being able to make a bolt that's half inch out to a million inches, how can we actually go ahead and limit that to the actual sizes that we want to use? And then we'll take a look at how we can use constraints as well. How many of you have used parameters or constraints in AutoCAD? So a little less than half. For some of you, this might be the first time you see parameters. I'll actually go through the parameters kind of quickly, since that's not really the focus of this class. But then we'll go ahead and see how we can use those in dynamic blocks.
And then finally we'll extract dynamic blocks to tables. How many of you have used the extract tool for attributes to get attributes into a table? So about a third of you. So we can use the same tool to bring in dynamic block information as well. So let's take a look at that too.
So again, if I give you a quick example here, this is the one that's straight out of the architectural tab. But I always loved the door example because it really drives home how any variations we can have of blocks. So this is the door that comes from, again, the palette that comes with AutoCAD. And it's a pretty simple door, but you're able to do six different door lengths, as you can see there, using the stretch grip that we have there. So already I've got six blocks in one, already saving time.
This one also has-- wait for it-- there you go, the little sizes of the door jamb, so four, five, and six inch. So I've now got 18 variations of this door. I can also show it open different ways. I could show it close, open 90 degrees, 30 degrees, et cetera. So I'm looking at 90 variations. Now granted, I can insert this one block and rotate it or mirror it afterwards.
But if I took into account all the different ways that it could be mirrored, then I'm looking at 180 if I flip it one way, and then 360 if I flip it another way. So if I want the door to come in exactly the way I want, there's 360 possible variations of this door. Imagine what that tool palette would look like, scrolling all the way down. So we're going to put that in one block. So that one is done in AutoCAD for us already. Like I said, I'm going to use some different examples as we go through here.
First thing I want to mention is, how do we edit a block? So we've got to double click on a block typically. Sometimes we have to get into the right click. Anybody know the exception of when we can't double click on a block to get it in the editor? Attributes, yeah. So if we have blocks with attributes, we can't double click on them. That brings up the Attribute Editor. So I like use the right click. Of course, you can use the ribbon as well. We'll have an example of that in just a little bit.
So again, if you can't do that, you can select the block and right click. Looks like I got some resolution issues there. Apologize for that. And then we have the Edit button in the block panel.
So this is our block creation environment. Typically it changes color. It has a gray background instead of the normal white or black, whatever you normally use. That can actually be changed in the settings. So if you don't like that gray background, you can change it. I left mine stock so that it looks just normal to you guys.
And then when we get into the block editor, we have our block editor contextual tab. So we've got all our tools up here that we can use to edit blocks. And then we also have our palette. So if you haven't used dynamic blocks but you've edited blocks, you might have close this palette just to get it off the screen since you're not using it. If that's the case, there is a button up top, the Authoring Palettes button, that you can click on to bring that back.
So there's four tabs. There's our parameters tabs, our actions, parameter sets, which kind of combines the parameters and actions, and then finally the constraints, which are pretty much the same as just the parametric tools that you might normally use in AutoCAD. So we'll talk through each of those.
But I want to jump into some of the examples here. The first one that I want to talk about is the ability to create multiple insertion points. So you guys have all been there, where you're inserting an object and you don't get the insertion point that you want. So of course what do we do, we insert it and then we maybe make some copies and move it over. So let me grab this file here real quick. And we'll start with my study hall.
So here's the example. I've got this desk. It's a nice block. You can see its insertion point here is in the midpoint. If I type I and enter to insert another one, drag that back over here on this screen, then I can go ahead and grab my desk. There we go. And bring it in. And I wanted to put it in this corner. Of course, if I knew the size, I could do some tracking. So not a good base point. So I ended up maybe clicking and placing it, and then coming back with my move command and putting it where I intended for it to go.
So I want one in each corner, so that's going to take me a little while. So I'm going to add the ability to have multiple insertion points. I'm going to double click on this block to get into the editor. And once again, let me get all my dialog boxes on the same screen here. There we go. So I'm in the block editor. If you haven't been on the block editor before, you can see the XY UCS icon up top to indicate where the insertion point is. And as you can see, my authoring palettes have disappeared. They're on my other screen here as well, so let me bring that back. So again, if you come in and you don't see it, here's the authoring palettes button up top here.
So the first thing I want to do is let's talk about base point. What if I wanted to change the base point? The first thing you could do is just move this block, maybe grab an endpoint and make that the new 0, 0. You also have the base point tool over here in the parameters panel. This isn't going to give you multiple base points. What this will do instead is replace your base point. So if you decide I wanted the bottom left corner of this table to be the base point, and then I'll go in and close my block editor, and again if you've edited a block before, you've seen this. My insertion point changed, so all of my desks changed locations.
If I were to double click on the block again and try to add more base points, it is not going to let me. So as you can see, when I bring in base point, it says the base point parameter already exists in this drawing. So what we're going to use instead is the points tool. So I'm going to back up a little bit, back before I added in that new base point. And I'm going to choose my point tool.
Now typically when you add in a parameter, you also have to add in an action. So I'm going to add in a parameter, such as a length, and then I'm going to use an action to drive that length. The points is a different situation. I could just place points. So I'm going to choose my point tool. And thinking about how I want this to go, I want it to cycle clockwise from my different base point. So I'm going to come over here to the right and place my first point.
So this is a parameter. And you can see the little exclamation point there. The exclamation point typically is a warning that you haven't applied an action yet. Now in this case, I don't want to apply an action. So this is one of the rare cases where I'm going to ignore that exclamation point. So I'm going to keep going and add a couple of more points here. There we go. Now these labels won't show up in the actual block, so I don't have to worry too much about putting them in the exact location that I want. Not following ANSI standards here or anything. There we go.
So you can test your blocks. But honestly on this particular one, it only works when you're actually inserting it, so it won't really let me test it anyway. So I'm going to go ahead and close my block editor. By the way, there is a Save Block button all the way over here on the left side. I almost never use it. I always just close my block editor and it will always prompt you to save. Don't use this X box. That will actually close the drawing that you're in. I've lost some work before by editing a block and then-- anybody else ever done that and then closing the block? Yeah, good. I'm not the only one. Well, not good. I'm sad that that happened to you, but glad I'm not the only one.
I'll go ahead and save my changes. And like I said, I'm not going to see any difference with these blocks. But if I go to Insert, and I'm just going to use I and Enter for my Insert command, now when I to bring this in, I can tap the Control key. So tapping the Control key will cycle me through those different insertion points. So now I can very quickly place this one. I'll repeat to insert. And again, I'll just cycle through to find-- whoops, I always get a little excited and go too far. There we go.
Now you won't see any additional grips or anything like that. You'll still just see the insertion point. So after I've placed it, there's no real way to jump back into those different points, but fantastic for inserting. That's one of my favorites. It's just so simple, but hopefully you can see really how effective that can be for inserting your blocks.
The next one that I want to look at-- and by the way, I've got a bunch of these to go through. I'm going to show you a bunch of different examples. Hopefully we'll have time for questions. If not, I'll happily take questions after the fact. The benefit of that is we won't be in a hurry, and also if I don't know the answer, I just look bad to you, not to our streaming audience. So please feel free to ask me questions when we're done here.
Let me go ahead and try out some alignments. So I am going to open up this half bath. I love the alignment grip. With the alignment grip, you just grab the little alignment grip, and then you simply move to the item you want to align to, and it will align for you. I love that one. You don't have to use the Rotate command. You don't have to know what weird angle you're at and set your rotation angle based on that. You can just align.
Notice that on this particular one the direction that that arrow is pointing. So it's basically pointing towards the object I want to move toward. So if I want it to align on that side, I'm going to come from that direction. But if I want it to align from this side, I'll just make sure I come from that direction as well.
So I want to keep that in mind when I'm actually placing my new alignment grip on my vanity here. So I'm going to double click on my vanity. And this is another one that's very simple. I don't need an action. I just need a parameter. So I'm going to choose my alignment parameter here, and I'll just choose my original base point. And then I'm going to basically specify that this bottom edge here of this vanity is what's going to align to another line. And I'm going to bring this out to the right.
And see how my grip is actually pointing up? So that means I've kind of got to go through the wall to get it to align with the wall. So I don't like that. I'm going to back up and do it again. And I'll go to the left side instead. So that way I've got my grip pointing down.
Now again I could test my block. But if I go into the tester, I won't really have anything to align to, so I'm just going to go ahead and close and save changes, and try it out here. So now you can see that my cabinet has an alignment grip. And very easily I can grab that one and then just simply move towards the wall that I wish to align to. So again, pretty simple, but hopefully wheels are turning. You can think about that block that you're sick of rotating, and you can go in and now put the alignment grip on it.
So let's take a look at the flip grip, typically known as mirror normally an AutoCAD. But inside the block environment process, it's called the flip grip. But again, we think of it normally as the mirror. So here I've got a door, very similar to the example that I used earlier, but I'm just going to add the flip grips to this particular one.
So I'm going to start by editing the blocking again. And this is going to be more like the typical example where I was saying you have to add a parameter and then an action. So I'm going to start with a flip parameter. And I'm going to decide where I want this to flip. I believe this is a two foot six door, so I'm going to track out here one foot three to find the middle. And then I'm going to create a vertical mirror line. So it doesn't really matter how far out I go. I'm just going to click to place my line, and then click to place my parameter. Again, the parameter is just text. It's not going to show up in the final product, so I don't have to worry too much about where it's at.
So as you can see, I've got the exclamation point here. And as I said, that's bad. It typically means that I need to add an action. So I am now going to move to the action tab, and choose my flip action.
So when you choose these actions, they typically have the same first step, which is, as you can see in my command line, to select the parameter that you want to associate to it. So I can either click on the text, or I can click on the line. It doesn't really matter. But I'm going to go and click on that parameter.
Now the command line is asking me for the objects I want to mirror. So I'll just do a big window around everything and enter. And I've now got my first flip. Now I'll show you the test tool, since I haven't had a chance to do that yet. So up here in the upper left, I'm going to choose to test the block. And basically I'm still inside the block, but now I can actually test out this grip. And so as you can see, it's flipping nicely for me. So again, this is where once or twice I've hit this X box and closed the entire drawing. I want to make sure I close just the test window.
I'll go ahead and add in another flip here real quick. And this time I want I to it flip vertically. Let me go back to my parameters. Got a little ahead of myself and chose the action. So I'm going to choose the flip parameter here. And I'm just going to try my best to align it right in the middle of the door here, use some tracking. I should type in a value, but in the interest of time, I'll go ahead and pop this in real quick.
And then same thing. I'll just go ahead and go to the actions. I'll choose the flip action, choose the parameter first, and then choose the object. So you get really used to that workflow because you kind of do the same thing over and over again.
This time I'm going to go ahead and close my block editor, save my changes. And now you can see that I should be able to flip it both ways. So again, hopefully you're thinking of that block that you commonly bring in and mirror, or maybe you've got two or three or four blocks that represent the different mirrored directions. Now we can put them into one, reduce that block library, and have a lot less blocks to have to look through.
So the next thing I want to show you, not only do I want to show you the rotation ability, but I also want to show you how the grouping works between the parameter and the action. So I'm going to double click on this tree, and as I said, the workflow is we at our parameter, and then we assign an action to that parameter. And we also have the ability to do parameter sets. So the idea with parameter sets is that it can reduce some time. We've got basically the parameter and the action all in one . Personally, I think linearly. I like going and putting in the parameter and then I like putting in the action. But if you want to go ahead and use the sets, that's fantastic. You just have to have another little step in there that you have to know about. So I'll show you what I mean here.
I'm going to go for my rotation set. I'm going to go and pick a base point, as it's asked me. So the center of these trees then is going to be my center. And then I need to specify a radius of the perimeter. So basically wherever I click, this is where my little round grip is going to go. So I'll just go ahead and place a grip here.
And then it's asking for my default angle. I'm going to press Enter to accept zero. And you can see now that I have the parameter. And then this little symbol is my action, but it has a little exclamation point on it, because I've never really told it what geometry I actually want to rotate. So with these tools, you don't have to rotate the entire geometry. You can just pick a portion of it.
So if you're using the set, the extra step that you have to do is you actually have to come over to this little icon, right click on it, and go to Selection Set and New Selection Set. As you can see, this is also where you can go to Modify if you want to add or remove things. But I'll go ahead and do New Selection Set, and then I'll window and pick everything here. Now when I enter, my exclamation point it's gone.
So again, it depends on what process you want to go. I like the linear step by step. Let's go see how this works. Grab my rotate. And then you can see I can easily rotate this tree. So try it out step by step, try out the sets, see which way you like better. I'm a fan, again, of the linear way, mostly because I forget to go back and right click and actually add my selection set. So I'll click OK and nothing happens, and then I remember I need to go back in and fix that.
Let's take a look next at the visibility. So the visibility is really cool because we can put a bunch of different blocks in one, and then only show one particular block at a time. So here's an example of some fasteners. So I've got a socket head, I've got a Phillips head, a slotted, and a square bolt. Could be even more than this. But I want to put these into one block. And again, I'm challenging you to think about what you do, what kinds of blocks do you have several of that you could just put in one little list and just pick the one that you want.
So for this one, I am going to do something a little weird, which is I'm going to create a block that's blank. I'm going to start with a blank block. So I'm going to choose my Create Block tool, B and Enter for those of you that like keyboard shortcuts. And I'll give it a name here of Fasteners Top. And I'll leave my origin at 0, 0.
And I'm not going to specify any objects, which again, it's kind of weird. You've probably never started a block and didn't select anything. Notice that I've checked to go ahead and open in the block editor. So as I click OK, first of all, even AutoCAD doubts me. It says, are you sure you want to do this? You didn't select any geometry. So I'm going to go ahead and say yes, that's what I want to do. I'll continue.
So now I'm in a blank slate. I've got a blank block here, and I can go ahead and start putting things in. So if you haven't drawn anything yet, now is when I'm going to start drawing my first visibility state, whatever it's going to be. In my case, I've already got blocks, so I'm going to insert those blocks to save time so you guys don't have to sit and watch me draw bolts. So again, I'm just going to go I and Enter. I'm going to pick my hex cap screw here, and I'm going to bring it in at 0, 0. And I can go ahead and explode it right now, but I'm going to go ahead and explode it out here. Anybody else ever check that explode and forget to uncheck it, and then it explodes blocks that you don't want? OK, good. Again, not just me.
So I'm going to go ahead and explode this. And the reason is I don't want nested blocks. I just want one block with a bunch of geometry in it. I don't want four blocks stored inside the other block. So I just typed X and Enter to do my explode here. And now I'm ready to do my visibility state. So notice this section up here in the upper right on my ribbon. This is where you control the visibility states. But you'll notice that it's grayed out. I can't actually edit it right now. So in order to do that, I've got to add a parameter.
So back to my parameters, here is my visibility parameter. And wherever I click is where my little drop down arrow is going to go. So think about where you want your drop down arrow to go. I'll just maybe go to the lower right here. And this is, again, another exception to the rule. I don't actually have an action for visibility. But notice that now that I put that in, I can now use this portion of my ribbon up here.
So I'm going to start by going indivisibility states and bringing up this little dialog box here. And you can see it has the very descriptive name of Visibility State 0. So first thing I'm going to do is fix that. I'm going to hit Rename, and I'll call this my socket cap screw. Then I'm going to create a new visibility state. It's kind of a weird example because I started with a block and then renamed it. But typically from then on, you create the view state first, and then you add stuff in it.
Some I'm going to go ahead and do another new one. And when I do, it's going to pop up this little dialog box that, first of all, wants me to name it. So my next one is going to be my slotted flat head screw. And what's important is the things right below it. So by default, if I go ahead click OK, it just leaves the visibility just as it is. But what I want AutoCAD to do is hide everything else. So I'm going to choose the option to hide all existing stuff in the new visibility state. So I'll click OK and OK. And as you can see, it's blank now so I'm just in a different visibility state.
Notice up here in my drop down, I'm currently in the slotted flathead screw visibility state. So once again, I'm going to Insert. I'm going to grab my slotted flat head screw. Bring it in at 0, 0. And then X and Enter to explode.
And that's all there is to it. So if you have several different blocks, you can put them together. I'll just repeat this a couple more times. I'll do a new. This one's going to be my Phillips flat head screw. And then once more I'm going to hide everything else and then click OK. And then once more I'll insert that particular one. And then I'll go ahead and explode it.
So I've got one more, but in the interest of time, I'm going to go ahead and just go with those three. So I'm going to go ahead and close my block editor and save changes. I do this exercise sometimes in my regular class. And the first thing the students do is they go to these blocks that already exist and look for the grips. So remember that I didn't edit one of these blocks like I did all the other ones. I created a whole new one.
So I'm going to go to Insert. And I'm going to find my new block of fasteners top here. I'm going to bring it in, and make sure I don't explode it. Of course, if I explode it, it won't work. So now when I select this one, I've got the drop down list here, and I can just simply choose the one that I want to jump to.
So again, in my opinion, a pretty powerful tool. I can reduce my block library instantly. If I've got very similar things, I can put them all into one and be able to just jump between the different ones.
Let's say that in my case, I find that I use the Phillips screw at least 50% of the time. I want that to be the default. So I can actually go back into the block editor and open up my visibility states manager here, and then just reorder them. So I'm going to grab my Phillips and bring it up to the top. And then save and close. And now you'll see the next time that I insert it, my Phillips is the default. So again, not only can I group them all together, but I can make the one that I use most often the default.
I think I'm doing OK on time. I just want to throw out, are there any questions so far based on what you've seen? Yes, sir.
AUDIENCE: [INAUDIBLE]
TRACY CHADWICK: OK. So the question was, the points that I put on the table, all the way around, are they snappable as insertion points, like when you use the Snap to Insert? I don't believe so. No. I'd have to go back and double check, but still that one grip is the insertion point, the base point. Good question. Any other questions? So for so good? Yeah.
AUDIENCE: [INAUDIBLE]
TRACY CHADWICK: To align what? I'm sorry.
AUDIENCE: [INAUDIBLE]
TRACY CHADWICK: The question was, is there a way to align just a portion of the block. So you'd want them basically to move apart. I don't believe so, because that's one command that since I didn't pick an action, usually when you pick an action that's when it asks you to select the objects you want apply it to, and it doesn't give us that option. So I'm pretty sure it's for the full block. Good question. Yes sir, one more question.
AUDIENCE: [INAUDIBLE]
TRACY CHADWICK: Was it really? OK. Yes, I can go back. Yeah, good question. So the question was, apparently when I did I my door, and unfortunately I'm having technical difficulties, I can't actually see on my computer, so I'm using this one. So I couldn't see very well, but apparently if I wasn't perfectly at a 90 degree, basically I don't know for sure if I could rotate that one. I usually just go back and delete that parameter and just redo it again. It's just as fast as anything. Good question.
All right, so we'll move on. Appreciate the questions. The next one that I want to look at is actually I'm going to look at two things at once. I'm going to look at how to do a stretch, but then I'm going to look at how to limit the allowable values. So I'll start with a stretch.
So I'm going to use a bolt as an example here. And what I would like to do is have different size bolts, different lengths. Of course I could do diameters as well, but I'm going to keep it simple and just do lengths. So the first thing that I want to do is, if you think about when I stretch something, I'm stretching a linear distance. So I need to start with a linear parameter. So I'm going to hop to my parameters tab, do a linear parameter.
And the other thing that I want to think about is the direction that I want this stretch to go. So obviously I want this one to go from left to right because I want the right side to stretch out. So as I pick my parameter, I want to make sure I pick left to right then.
So I'll go ahead and pick my base point here. And then I'll go ahead and pick my midpoint over here on this side. And there is my parameter. Now I've broken all sorts of ANSI rules. This is not final dimensioning. It's OK that I've got extension lines crossing into it. In fact, sometimes I end up with a little bit of goofiness if I try to actually just go off the top points. So I'd just like to actually click on the geometry that I know I want to drive.
So there's my parameter. Next I am going to the actions tab, and I'm going to put a stretch on it. So first I'm going to select my parameter. And then once I've done so, now it asks me one additional thing, which is which point do I want to associate this with. So am I wanting to stretch basically the left side or the right side. So I'm just going to click when that right side point is highlighted.
Now you can see that the command line is asking me for the first quarter of my stretch frame. So I should use what type of selection method? Crossing? Yes. So I've got to use a crossing or crossing polygon or crossing lasso when I'm doing this stretch.
Here's what's kind of odd about this. If you actually look at the command line above, right now it's wanting to know the area that I want to stretch. So I'm going to pick two points here to create a crossing that will stretch out these threads. Now the normal stretch command, we're done. But now if you look at the command line, it says select the objects you want to stretch. It wants me to pick another crossing window. So that's another example where I can actually pick an area that I want to stretch, but then only decide that I want to stretch certain things inside that area. Typically I want the same frame, so I just end up creating two very similar stretch frames here. We'll go ahead and press Enter.
I've now got the stretch applied to it. Let me go check this out and see how this works. And again, I can use the test block. Personally, I just like to save and go and look at it in the drawing. So I'm going to go ahead and grab this one. You can see that I've got the stretch grip here. And now I can simply stretch that in and out.
Now I don't see the left side grip because the base point grip is there. Had I chosen a different point, I might also see the left side grip. And I'll show you how I can make sure that that doesn't happen. But again, I can stretch this thing from here to eternity. I can even stretch it inside out, I believe. Yeah, that's no good, right?
So I'm going to control that. I've got some specific size fasteners that I use, and I want to make sure I'm only allowed to choose those particular fasteners. So I'm going to get back into the block editor. And what we're looking for now is properties. So we're going to open up our Properties panel, your favorite way, there's a million of them. I like typing CH and enter for Change Properties. That will bring up this palette here.
And what I'm looking to control is this parameter. So I want to put an allowable limit of values that that can be stretched to. So I'm going to pick on that parameter, and then come down here into my properties. And towards the bottom, I'm going to see this little area called value set. And by default, it's set to none. I'm going to go ahead and click that and change it to-- I can do an increment or a list. I'll come back to the increment example in just a moment. But I'll go ahead and choose a list.
And now I'll go ahead and specify the values that I will allow. And I can do that right here just by separating them with a comma. I can also click this little Build button here. And then I will get a little dialog that I can go ahead and add in the values. So I'm going to go with 1, 1 and 1/2, 2, 2 and 1/2, 3. So I'll type in my allowable values, click OK, and now you can see that those are put in there.
And then I mentioned earlier that this little grip over here on the left side, it didn't show up because my base point was there. But in any case, if I wanted to make sure it was really gone, I can come down here and change my number of grips from 2 to 1. And that's, again, where it's important that I pick left to right. So I'm left with only the one on the right. So I'm going to go ahead and close this block and save the changes. And now I'll take a look at it.
So now when I grab this little grip, I've got dynamic turned on. So if you've got dynamic input turned on, you're going to get a little readout of the length as you go, which is nice. But you'll also see little tick marks for the allowable range of values that I can jump to. So I must have missed one in there. But nonetheless, you can see the different values that I can jump to. I can no longer stretch it inside out, and I can no longer stretch it to eternity.
So again, that worked on the stretch. That would work on any other linear command that I would change, arrays. I'll look at an array in just a little bit. But anything that you use the linear parameter for, you can apply that to. And not only that one, but even rotational ones. So let me give you an example of a rotational one here. I'm going to go back to my trees and I'm going to edit this one. And I'm going to grab this angle parameter this time.
So now if I look at my value list, it's an angle type. So I can actually set this to a list of allowable values. And then I can go ahead and put in the allowable one. So let's say I only want it to go 90 degree angles. 180 and 270. So now as I close this, you can see that I'm only able to rotate it at the 90 degree increments. So you can actually even see the little tick marks there.
So again, a lot of tips and tools that I'm showing you, and they apply to different ones. I could take all day and show you every single one. But I just want to give you, again, the tools to try and apply to the different ones, and really go back and apply them to your blocks back at work.
So the next thing that I wanted to do is let's do an array. And then I'll also add an increment to my array. So an array works very similar because, it is just a linear value that I'm going to drive. And in my example, I'm only going to drive it one way. But just like a rectangular array, you could do horizontal and vertical.
So in my case, I've got these little parking stalls that are nine foot wide. I've got a lot of copying to finish filling up this parking lot here. And instead of doing that, I'm going to use a grip to do that. So I'm going to double click on this block to edit it. And once I'm in the block here, I'm going to create a linear parameter again. Because basically I want to drive the vertical value here. So back to my parameters, and then linear. And I'll just pick top to bottom from this one, knowing that I want it to array down based on the way that I had it oriented.
And then I'm going to apply my array. So back to my actions tab, I'm going to choose my array tool. And just like every other one, it wants to know what parameter I want to apply this to. So I'll click on the distance here. And then now it wants me to select my objects. So I'll select everything and press Enter.
And now I haven't figured this out yet, but it's asking me for the distance between columns. Obviously, technically that would be distance between rows the way I've got this oriented. But nonetheless, I'm going to go ahead and put in 9 for decimal feet on this particular example.
So I'm going to save and close this. And you'll see that it works, but it's easy to goof up. So I can actually grab this now. I've got these nice little grips. I can grab this and very easily create an array. So pretty nice little block. Pop it in, array it, you're done.
However, this one, you can see if I grab the top one, it gets real goofy. It basically stretches it out. Not the way that I want it to go. And you can also see that I'm able to stretch it half a parking width distance, which is not really what I want to do either. I want to control it so it's only 9 feet.
So I'm going to undo back on a couple of those changes there, and edit this block again. And then once again, I'm going to go to my properties. So I'm going to pick my linear parameter here. I'm going to come down to my number of grips, first of all, and set it to one, because I want to get rid of that top grip that got real goofy when I stretched it out towards the top. And then I'm going to choose this time, instead of choosing a list-- because I've got a lot of parking spaces, right? I don't want to put in 9, 18, 27, et cetera. I want to do increments.
So with the increment, I've got to give it a incremental value, which is going to be 9. I'm going to give it a minimum value, which is one parking space, or 9. And then I'm going to give it a maximum. So this could be a giant number. I'll say 9,000. So that could be 1,000 parking spaces. So that should be plenty.
So I'll go ahead and close my block editor and save the changes . And now I want to grab one of these. I'll actually do two at once here on this one. I can grab this grip. And now you can see that it locks onto the increments. I've also gotten rid of the other grip that allowed me to goof that up. So now I can very easily finish out my drawing here. So again, linear parameter, this time it was an array. And then we can control those values using our properties.
So speaking of controlling things, I was talking about that block earlier that was a bolt. And we controlled it a little better by putting in an allowable range of values. And I want to go ahead and pop open a different one, since I happened to miss one of those values, I noticed. So I've got my allowable range of values. As I said, when dynamic input's turned on, it's nice because I can see the length of the bolt. If I turn dynamic input off, then when I grab that, then you don't actually get to see the length of the value. So how big is this bolt? I don't know.
So what I'm going to do instead is instead of grabbing the little arrow and stretching it out, I'm going to create an allowable list of values, that we can just pick from a dropdown list. So it will be kind of like that visibility state. But this time, instead of just showing me different things, it'll be driving the constraint instead.
So I'll double click to get back into this block and click OK. And what I'm looking for this time, back on my parameters tab, is the lookup value. So I'm going to choose the lookup value, and click to place this grip. So again, this is just where my drop down grip is going to be. So you decide where you want that to be. Then I'm going to switch to my actions here and add the lookup action.
So I'll choose my lookup action. As with every other one, select the parameter you want to apply this to. And when I do so, it's going to give me this little dialog box. So in this dialog box, down the left side, I can choose the allowable values. Right now I can't do anything. What I've got to do is actually go in and add the parameter that I actually want to drive.
So when I click this button, it brings up another little dialog box here. I've only got one parameter in this drawing, so it's pretty straightforward which one I want to grab. But obviously if I have more, I want to make sure I pick the right one. Now that I've added that parameter, I actually get a dropdown list of all the allowable values here. So I can very simply go through and pick each value in each row. So now I've got my 1 inch to 3 inch.
Over here on the right side, this is what I want to actually show up in my drop down list. So I want it to be a little nicer than just simply the 1.00. I'm actually going to put in the size of the fastener. So it's a 1/2 inch by 1.00, for example. And then I'll go ahead and copy that. Let's try that again. I don't want to type it in each time, so I want to do a copy and paste. So then I'll put in my 0.5 there. Whoops, goofed up the space there. And one more.
So now that I've got my block list, right now I have a decision to make. Sometimes I like to think of myself as the CAD manager, and I'm creating this block for my users to use. What do I want my users to do? Do I want them to use the dropdown list, or do I want them to grab that grip and stretch it out? Or do I want them to do both? If I want them to do both, I'm going to stop right here. If I want them to only use the dropdown list, then I'm going to go ahead and turn off this second grip as well on this parameter. So I'm going to click on that parameter and I'm going to set this to zero grips. So I'll go ahead and close my block editor and save changes. And now you can see when I select this block, instead of seeing the grip, I now have a nice little drop down that details what the different sizes are. I don't have to guess. I don't have to turn dynamic input on if you don't like that. And you can choose the exact block size that you want.
So again, I think we're doing OK on time. I'll take a minute or two to see if there's any questions so far. Anybody have any questions based on what you've seen? Yes.
AUDIENCE: [INAUDIBLE]
TRACY CHADWICK: Good question. So the question was, can you drive extrusion length? Unfortunately, to this point, dynamic blocks are only for the 2D environment. They don't support 3D with dynamic blocks. I keep hoping they'll add that each year, but as of yet, they haven't. So, good question. Any other questions?
Well then let's take a look at another example here. So I'm going to get into parameters now. And I know when I asked if people had experience in parameters, most of the people it looked like did not in this class. So as I mentioned, I'm going to add some parameters. I'll discuss them a little bit as I go along here. But again, our purpose wasn't parameters. Rick Ellis did one at the beginning of AU, so hopefully that gets recorded and you can check that out if you want.
Here I've got a window. And what I would like this window to do is I would like it to stretch out to different sizes, different widths, different lengths. And I can do that several different ways. I can do some stretching, obviously. But again, I don't want to just grab a grip and stretch it out. I want to have some predefined window sizes that my company tends to use.
So I'm going to start by double clicking on this window and getting into the block editor. And the thing that I've got to watch out for is what if I just threw the linear parameter on here and did a stretch on it? So let me show you that real quick. I'm going to throw a linear parameter on here, and then I can do the stretch, just the same as I did earlier. And it'll work pretty well. I'll go ahead and grab this point. Whoops, I goofed up my stretch frame here. So let me back up here. Sorry about that. So stretch action and parameter. There we go. Point. And then now my stretch frame.
So this is going to work just fine, because I've created the perfect stretch frame that crosses over. So when I create the stretch frame like that, all of these pieces tend to stay together. These end points stay with each other. What I'm going to do instead of doing the stretch is I am going to use some parameters.
Let me get rid of this one hopefully if it will let me. There we go. As I mentioned, we're going to take a look at the fourth tab here, which is constraints. Now you also have this across the top in your ribbon. So here's my parameters as well, geometric and dimensional constraints.
I know I asked about parameters. How many of you of have used Autodesk Inventor, or another parametric program like that? Similar idea. Typically in AutoCAD, when we draw, we draw the exact size we want. We draw from line to line, and the point is technically together, but we can move them apart. I can actually grab this line and just drag it over. There's no relationship between those things.
So what I want to do is establish a relationship between those. I want those points to be coincident, to actually touch each other. And then I also want those lines to be perpendicular to each other. Now I could bore you by going through every single constraint, but fortunately we have this cool auto constrain tool. So I can choose Auto Constrain and window around my geometry and press Enter.
And you'll now notice that at each vertex, there's a blue dot or square. And that is our coincident. It shows that those two points are together, and they won't pull apart. You can also see some parallel symbols. If I hold my mouse over any of these little glyphs, it'll show you what it's applied to. So those two lines are parallel to each other. I've got the coincidents. I've got parallel, et cetera.
So now I can't just grab this line anymore and pull it. If I do, you can see that the geometry that was attached to it goes with it. So I've got my geometric constraints there. I now want to put in some dimensional parameters. And what I'm going to do now, to change the size of this window, instead of just using the stretch tool, I'm going to define a parameter for width and define a parameter for height. And then I'm going to drive those parameters.
So I'm going to start by jumping into my parameters manager. So up top here in my ribbon, here is the parameters manager. And once again, popped over here on my other screen. I'm simply going to name some parameters. And you could do this first or you can do this at the end. I like to do it first. So I'm going to click this button to create a new parameter. And I'll start with width.
And then I'm going to go ahead and set in the value. I believe my default is 3 feet, so I'm going to go with that, because I don't want it to tweak too much once I create it. So I'll create a height. And I'll go ahead and set this to 4 feet.
You can also do formulas in here. So if I really wanted to, let's say that the height was always going to be twice the width. I can actually go ahead and put in width times 2. And as you can see, that calculated value updates. So that way it's all being driven by the width. But again, I'm going to go ahead and hard code in a 4 foot for this one. But for those of you that are new to parameters, just wanted you to see that.
And then I'm going to create a parameter for the stiles. That is going to be 1 and 3/4 inch. And I goofed that up. Let's try that again. There we go. And then one for the rails. And once again, 1 and 3/4 inch for that one.
So now that I've got those parameters, I can now assign them to my drawing. So I'm going to close my parameters dialog box here. And I'm going to start with the width dimension. So I'm going to use my linear. And I'll just simply start from this endpoint to this endpoint. And then when I click to place it, it gives me the ability to type in a different value if I want. I'm going to type in width. So it's now tied to that parameter.
So I'm going to do the same thing vertically. So once more I'll choose the two points here. And this one I'm going to change to height. You of course need to make sure you type it in exactly the same way. I believe it's case sensitive as well. And then I'll go ahead and pop in a few for the stiles. You can also specifically choose horizontal or vertical, which I'm going to do just to make sure I get the right things here. So this will be my stile on this side, and then a style on this side.
And then I'll add in some vertical dimensions for my rails. Try that again. Not sure what I did there. Yeah, that should be vertical. Sorry, it's a little tough looking at this big screen instead of my computer in front of me. There we go. So that will be one of my rail. It was hiding, but I'll just type in rail. Vertical again. Then I'll have one more rail to go. Try that again.
And then the last thing that I need then is a formula to make sure that that middle rail, or the sash, always stays in the middle. So I'm going to make one more vertical dimension here from the very top until-- I don't have a center line running through there, so I'm going to use this one. And I'm going to make set this to height divided by 2. But then I'm going to subtract half the rail height as well. And that should keep that perfectly centered.
So next then, I want to create a block table. So up top here is my block table tool. And I'm simply just going to click to place my parameter and decide how many grips that I want. So I'll enter to accept one. And it brings up my table here.
So in my table, I can go ahead and tell it which parameters I want to bring in. Now I created the stiles and the rails. I don't actually want to drive those. I want them to stay the same size. It also recognizes the other dimensions that I created. So I really just want my width and height. So I'm going to choose width and height.
And then I'm simply going to type in allowable values. So let's say I want a 2 foot by 2 foot window, and a 2 foot by 3 foot, 3 foot by 3 foot, 3 foot by 4 foot, and I'll just stop there. So I've got my different size values that are allowable. I'll go ahead and click OK now. And I'll go ahead and close my block and save it, and check out my grip here now.
Now I wasn't paying super close attention, so hopefully I did my parameters in the correct way. Let's see. 2 foot, and then I can choose a different-- oh, I goofed. So, see how that happened? That happened because when I created my parameter, I went top down. And so the first one you click is the stationary one. So I should have clicked my bottom point first and went up from there. So I'd like to say I did that on purpose to show you what happens if you picked it wrong, but that wouldn't be honest. So just make sure you pick the order that it's going to actually stretch out.
We've got a few minutes left. I want to look at one more thing. I mentioned at the beginning of class that you can extract data using dynamic blocks just like you can with attributes. So I've got a very simple office building here. And I've got a block that has attributes in it. So it's got a little room number block. And I'm going to create a table that not only uses the attribute information, but let's look at this door. I'll switch to model space in here maybe. There we go.
So this is actually a dynamic block. So it has the ability to stretch out to the different sizes. And of course, it has the different widths of the wall, everything that we talked about at the beginning of class here. So I want to go and create a table. I'm going to go to my Insert tab and then Extract Data. You can also do this inside the table tool. I'm sure most of you know that.
So first thing I'm going to do is create a new data extraction. And when I click Next, it's going to ask me to save this data extraction. And the really nice thing about that is this .dxe file, the next time I want to do the same exact extraction, I don't have to do all these steps. I can just pick the same extraction, and then be able to go from there. So I'll just call this door schedule. Next.
So the next thing it does is it shows me all the different types of objects that are inside this drawing. I can filter down individually. I can also get rid of all object types and only show blocks. That narrows it down quite a bit. I only want my single flush door, so I'll choose that, click Next.
These are all the different attributes that we can look at and fields that we can bring in. Over here on the right side, I can narrow that down. So I don't want to see miscellaneous or geometry. All I really want to see is attribute information and dynamic block information. So again, a lot of you said you had done the attributes before. Dynamic block data shows up just the same. If you didn't have a dynamic block in your drawing, you wouldn't have seen this option here.
Now I can go ahead and filter down even more. I want to show my door size and the height. I don't want to show the hinge. That's, again, the direction it's going. I don't want to show the opening angle, although I could. I don't want to show the swing direction or the wall thickness. Or again, I could on each of those if I really wanted to.
So I'll go ahead and hit Next. I don't really want to count these, because they're all going to be individually anyways. I can rename the columns. So instead of name, maybe I want to rename this type. And then the door size, that's just driven by the actual dynamic block. I'm going to change that to width. That makes more sense. And then of course I can reorder these. Maybe I want to show Mark first. Maybe I want to sort by Mark. And then I can go ahead and click Next.
So finally I can decide what I want to do with this table. Do I want to make an AutoCAD block? Or do I want to make an Excel spreadsheet? So I'm going to go out and choose to do both. And then of course I can tell it where the Excel spreadsheet goes, but I'll go ahead and click Next. Then since I'm making an AutoCAD table, my style pops up. It wants to know which style I would like to use. So I can go ahead and click Next and Finish. Now I can place my table.
So let's say that I had a change. Maybe I'm going to put another entrance in here. So I'm going to double click in here and insert another block. Let's use my single flush door here. Click to place it. Pull this back over so you can see. That will be door number 105. And then I can resize it. And then of course I can go ahead and rotate and move it into place. But in the interest of time, I'm right up against the end of class, so I'm just going to leave it as is.
Then I can go back to this table, select it. It's back in paper space, so let me go back to paper space. Select my table, right click and update table data links. And now you can see my new line there. Now that won't have updated the spreadsheet. You'll see that also in the right click, Write Data Links to External Source. If I want to update that spreadsheet, I've got to do that as well.
All right. So I know we got started a couple minutes late, so we're right at 6:00. So just a couple more things that I want to mention here. Can you believe that Autodesk University 2016 is almost over? It's crazy.
So if you have some questions, as I said, I'll hang around. Feel free to come up here and ask me. There is my Twitter handle, @tracy_chadwick. Anybody on the Autodesk forums? A few. They actually have a dedicated forum to dynamic blocks in the AutoCAD section. Amazing stuff going on in there. People do crazy things with dynamics blocks. I kept it pretty normal in here. But people are always happy to help in there. That's a great resource. So feel free to check that out.
Lastly, please fill out your surveys. Let us know how we did. And I guess that does it for AU 2016. So thank you very much guys. Hopefully I'll see you next year. Thank you.