AU Class
AU Class
class - AU

A Practical Guide to Parametric Drawing in AutoCAD

共享此课程

说明

Parametric design tools aren’t just for programs like Inventor software, Revit software, InfraWorks software, or AutoCAD Civil 3D software; there’s a set of parametric drawing tools that you can use to create dynamic relationships and constraints between objects in AutoCAD software as well. The parametric drawing tools will revolutionize the way that you draw and edit objects in AutoCAD. This class will introduce you to parametric drawing in AutoCAD by using both geometric and dimensional constraints to add intelligence to your objects. You’ll discover how using Auto Constrain and Inferred Constraints can help you quickly add constraints and change your process from drafting to modeling. If you’ve ever wanted geometry in your drawing to update based on changes that you’ve made to other objects, or if you’ve wanted to type a new value into a dimension and have the object update based on this new value, then this class is for you.

主要学习内容

  • Learn how to create geometric relationships between objects by adding constraints
  • Discover dimensional constraints
  • Learn how to identify and edit constrained objects
  • Learn how to use inferred constraints so that AutoCAD will automatically define constraints for you

讲师

  • Rick Ellis 的头像
    Rick Ellis
    Rick Ellis is the President of CADapult Software Solutions, Inc., where he provides training and consulting services to clients around the country, helping them get the most out of their design software investment. Rick specializes in Autodesk® Civil 3D®, AutoCAD® Map 3D, Autodesk® InfraWorks™, AutoCAD® Raster Design, and AutoCAD®. He is a member of the Autodesk Developer Network, and author of several critically acclaimed books on AutoCAD Civil 3D, and AutoCAD Map 3D; including the Practical Guide series. Rick continues to use AutoCAD Civil 3D on projects in a production environment, in addition to teaching classes to organizations both large and small around the country. This practical background and approach has made him a sought after instructor by organizations around the world.
Video Player is loading.
Current Time 0:00
Duration 0:00
Loaded: 0%
Stream Type LIVE
Remaining Time 0:00
 
1x
  • Chapters
  • descriptions off, selected
  • subtitles off, selected
      Transcript

      RICK ELLIS: All right. Good morning. We will get started here. It looks like it is time.

      So first class of the day on day two. How's everybody doing? Good? That was enthusiastic, even. I did not feel enthusiastic when the alarm went off this morning. I don't know about you guys.

      Well, I'm glad you made it out this morning. Hope you had a good first day of AU yesterday. This class is, as it says on the screen there, parametric drawing in AutoCAD, basically a tool that's been around for a number of years now that kind of gets overlooked. And we're going to talk about how it works, what it does, and really kind of just dig into the nuts and bolts, fundamentals part of it, and then let you all think about how it may or may not apply to what you do back at your own jobs and stuff. So that's what we're after in this 90 minutes that we've got.

      Just briefly, if you're wondering who I am, I'm an independent consultant, trainer, author. I primarily work with the civil survey products, so Civil 3D, the GIS products like AutoCAD Map. I also do some AutoCAD stuff as well. I'm part of the Autodesk University Advisory Council, which is, again, a group of us, about a dozen of us that are not AutoCAD or Autodesk employees, but work with the AU team as far as, hopefully, advising them on plans that they have, new things that they want to do with AU, and stuff like that.

      And I believe, if my math is correct, this is year 14 for me teaching at AU. So time flies by, as we were talking up here in the front row. So that's kind of enough about me.

      To help me out, in the back I've got three very, very qualified lab assistants to help you. We've got Curt, who's walking towards the back. If you're active online with any sort of CAD-related stuff, you may have come across him as a Kungfu Drafter there, to let you put a face with a blog. He has also started a new site, Kungfu Manager. Is that correct? Am I getting that right? OK. So some definitely interesting stuff to check out there if you're looking online.

      Al and Tracy are both on the education side of things. Al has an ATC in San Diego. So it's probably not raining in San Diego today. Oh, it is? OK. So it's got all of us here. I know that a number of us were a little surprised at that this morning.

      And Tracy is an instructor at Hutchinson Community College. And Tracy and I actually wrote an AutoCAD book together about a year ago and stuff. So he took the lead on that. So he's a published author as well with this.

      So just to back up a minute on this, the reason that they're here is to help you all out. Obviously, there's room for about 100 of you out here. If I was to stop for every single question that you might have-- if somebody can't find a file, or your computer doesn't work, or your mouse stops working or some crazy things like that-- we wouldn't get through very much material. So they're going to help you out with those types of questions.

      If you've got questions as far as understanding what I'm saying and with the material, conceptual things-- well, hey, could I do this with it-- absolutely I'll take some of those questions because I want to share those with the group. But the technical stuff, the three amigos there in the back will help you out with. Just wave them down. They will come in and help you.

      So as far as you guys, I'm curious as far as what industries you all are coming from because this class, I am going to make it as nonspecific or agnostic as we could be as far as industry goes because I want you to just focus on the tools. And nobody knows what you guys do better than you all do. So you can think about how it may apply. We're going to focus just on it on the tools there.

      So how many do we have-- I guess we'll start with my end of things. How many of you are in the civil survey GIS type of arena? So a few of you. See, I knew I was among friends. How about architects? I won't hold it against you. Oh, no. Hey, Al and I are good friends. He's an architect. It's like cats and dogs living together and everything. How about mechanical? We had some mechanical people here. Great.

      What am I missing? Electrical. How about that? Electrical. All right. Bunch of electrical. That's awesome. Who else do I not get? Nobody draws, like, dental equipment or something weird like that. Landscape architect. OK. My point being, we're a fairly diverse group with this. I am not going to have a specific example that meets every single one of your industries, and I'm not even going to try with that.

      We're actually going to draw some pretty simple stuff, if you had looked at the handout through here. We're going to draw some basic shapes a lot of times because I don't want you to focus on engineering during this class. I want you to focus on what does this tool do, and then you know how it can apply to what you would do with that.

      So you have probably been asked to fill out surveys throughout your first day here at AU. I want to encourage you to keep doing that. That type of feedback helps the AU team decide what types of classes you want to see in the future, what types of instructors you want to see back, things like that. So definitely fill those out. I believe they are only three questions this year, so anybody can get through three questions. And I would suggest, honestly, do it before you leave class in each class that you're in. It's fresh in your mind. Boom, boom, boom, you do it right on the app on your phone or tablet.

      And more importantly, this year, because we all like free stuff or want to hope to win something in Vegas, which might be a long shot, they are giving away a conference pass to AU 2020 every day based on who fills out your survey. So each survey you fill out is another ticket in the jar that you're hoping that they're going to pick out. So why not fill it out now? If you wait till Friday to fill them out not, A, you don't remember what you saw, probably, between all your different classes, and B, you don't get a chance to win anything. So do your surveys. Enough on that.

      Also, because we want to give away some free stuff, I'm going to give away one of Tracy's books here at the end of the class. We'll wait till the end of the class to do that just because you have to suffer through me for an hour and a half before you get a chance to win anything with that.

      If they handed you a business card on your way in, it was not just me shamelessly promoting myself. We're going to use that as a way to give away the book. So just hang onto those, at least till the end there.

      So what are we going to do? We got through our agenda. We're going to talk some about what parametric drawing is because just if we define some of this stuff, it becomes a lot easier. That's common within all of Autodesk-type things. Once you start to learn the definitions and what they meant, it becomes pretty easy to do.

      And then we're going to talk about constraints for a long time. There is basically different types of constraints that we can do in parametric drawing. We have parametric in general, and they're broken into geometric and dimensional constraints. So we're going to talk about all that. I get to say constraints over and over again.

      Then we're going to look at how you might use constraints inside of dynamic blocks, which is another kind of interesting take on things. And they will get pretty powerful there. And then we're going to look at, time permitting at the end, kind of an out-of-the-box way to use constraints where you can manage annotation with that, too. So that's what we are after here.

      So as far as goals for the class, they're kind of the same that I have for every class that I teach. Obviously, you want to learn some new skills. That's why you're here in a lab. More than anything, I just want to make you think about this, think about how might this apply to you. How does it make sense? So even if you can't use a tool, if we made you think, that was worthwhile. And then obviously, if we can have a little bit of fun during our time together, that's going to be even better.

      So with questions, like I said before, lab assistants are here to help you with that. I'll take a short time after each topic, maybe take a few questions. I probably can't take everything because, again, we might just grind to a halt. After the session, there is another lab in here, I believe 15 minutes after we're done. They've got a pretty tight turnaround on things. So I don't want to be in the way of the next instructor. I want to respect him or her, whoever it may be.

      So I'll be packing stuff up. If you want to talk to me while I'm packing things up, that's fine. Otherwise, if you want to meet me out in the hall afterwards, I'm happy to stick around and talk about anything that you want then. Or if you see me at any time during the conference, grab me in the hall and talk about stuff. That's fine, too. I just don't want a line of 45 minutes worth of people up at the front when we've got another class that's going to start because I've been in that position as well, as an instructor, saying, hey, I need to get ready for my class. So we want to get out.

      You also will have my email. It's in the handout. It's also on the business card that you got, or you can connect with me through the AU app if that works. I haven't connect with anybody because nobody wants to yet. So we'll leave it like that.

      Curt's our dog guy. Do you have an answer for my question, Curt?

      CURT MORENO: My dogs wear their pants like the one on the right. The one on the left is just silly.

      RICK ELLIS: OK, because the one on the right isn't silly at all. Does he wear them backwards, so it uses, like, a zipper for the tail?

      CURT MORENO: They're doggie pants.

      RICK ELLIS: I don't know. I'm just asking. I tend to think about things. So anyway, I want to take you guys through a quick exercise to start where we just look at an example of what you can do with parametric drawing and stuff. So on your desktop, you should see an icon for AutoCAD. If you haven't launched that, go ahead and open it up.

      Also, if you didn't bring a handout with you, that's OK. You can look it up on your phone or your tablet if you have that. It should be available on the app. Also, I put a PDF of the handout in the data set for the class as well. So there is an icon on your desktop that says Data Set that will just bring up Windows Explorer.

      If you find our class in that-- which is whatever our class number is, and then A Practical Guide to Parametric Drawing is the name-- inside of that there is a PDF where you'll have the handout with everything, step by step, that we're going to do today.

      I'm going to jump over to AutoCAD. And I'll open up this drawing. So we're going to go to the drawing inside of Data Sets, off your C drive, Data Sets, and then our class name. And inside of that is a folder called Completed Assembly. So if you go to that folder in our data set called Completed Assembly, and there is one there called Widget Arm Assembly Complete. That's the name of the file, Widget Arm Assembly Complete.

      So if you open that, what we will see when that comes up is something that looks like this. I'll give everybody a moment to find it.

      Now this is a drawing that somebody has applied a bunch of constraints to in AutoCAD. We'll look at how we do this. We're actually going to build this at the end of class, providing we have time, which we should. And this is really something that's made up out of just a couple of blocks, or a handful of blocks. And if you pick one of those blocks like that main one that I have selected, and you select the grip, you'll notice that all you're allowed to do is slide it up and down.

      Oh, the data set is not on there?

      [INTERPOSING VOICES]

      RICK ELLIS: Curt? Data set's on here. OK. Oh. Let's back up just one second here as far as are you browsing to the data set in AutoCAD, or are you looking for it in just Windows Explorer? Both ways, OK. Because since these are virtual machines, you're going to have two instances of Explorer, basically, to look for things.

      I'm on my laptop so I don't have the virtual machine. But you may see a bar at the bottom and then one above that. Stick on the one above it. Basically, you're working within a window that is that virtual machine on your desktop. Now if you have launched AutoCAD, You should just be able to browse to the C drive and see that data sets folder if they pushed everything like they were supposed to here.

      If not, Curt has got a jump drive that we should be able to copy some stuff around to there. So just make sure you catch them. If you don't have the data set and it's not showing up here, just watch what I'm going to do on this one step because I just want to show you kind of what parametric drawing stuff does, period. So you don't you won't get to touch this one, but that's OK. It won't hurt us.

      Basically, I can just pick that block. I don't have Ortho turned on. I don't have Snaps turned on. But this block is only allowed to slide up and down that shaft in the assembly. It has constraints that tell it that. And you'll see that there's a dimensional constraint on it that says that it is 0.5 units from the edge in how it's dimensioned.

      Also, you see the two arms are connected, and they rotate with each other. If I drag this down to, say, this position and just double-click on that dimension, and instead of 0.5, maybe I type in 0.9, you'll see that it moves over. And now it slides at the offset of 0.9.

      So we just edited a dimension and the geometry changed, which is not how AutoCAD works. We always edit the geometry in AutoCAD and the dimensions update based on that. So this is something that might look a little bit more like one of the vertical products like Inventor or Revit, Civil 3D, some of those types of things.

      So that's what we can do. That's what we will set up eventually. And that's really all that we wanted to see or show in that particular exercise.

      Another one to show you here. You could open up-- in the folder right above that is Parametric Geometric is the drawing name. And again, you can just watch this one if you want. But this has basically like an old orthographic projection that somebody has drawn. Now normally in AutoCAD, this would just be a bunch of independent lines or arcs that are there.

      But notice if you pick one of those lines and start to move it around, check out the view below it. So it knows that those are tied together. If I was to pick this line, it knows that those are moved together. So just using AutoCAD commands to stretch or move objects, other objects are connected to those, or they are, in Autodesk's terms, constrained so that they match that geometry. So that's what parametric drawing is in AutoCAD. That's what we're going to try to do here.

      So we'll back up a little bit now and talk about how does this work. How do I make this happen in my drawing?

      So basically, if you ever wanted to do anything like this, keep two lines the same length all the time. Keep two lines perpendicular to each other. Edit a dimension and have the object update. These are just all examples of what parametric drawing does. And that's just a few of them. There are certainly more than this.

      But if you're longtime AutoCAD users, you're probably thinking, this is not typically how I'm used to using AutoCAD. So that may get us to think and change things a little bit. I looked up in the Help what Autodesk's definition of parametric drawing was. You can see it here. You can read it if you want. It's a mouthful. Basically, it is a feature that allows objects to be related to one another. It establishes these connections or relationships.

      An old friend of mine, Bill Fein, who used to write for Catalyst for a long time, he referred to them as sticky Object Snaps. I mean, we've all used Object Snaps. At least I hope we've all used Object Snaps. If you're not using Object Snaps, probably be a good idea. But we all know that Object Snaps work for that one moment in time.

      When you snap these two lines perpendicular to each other, they're perpendicular now, but if I change anything in the drawing related to those, they're not going to stay perpendicular. Somebody can go stretch or move either one of those lines, and they're not going to stay that way.

      Well, basically, parametric drawing, or in particular, geometric constraints, allow it to stay that way permanently. So if you were to move one of those perpendicular lines, the other line would also adjust so it stays perpendicular based on the constraints that you put in. And the dimensional constraint end of things is basically just dimensions that drive geometry, rather than the geometry driving the dimension.

      Who hasn't looked at a dimension and said, oh, I need to change the length of that line? Wouldn't it be cool to just go in and type the length of the line and the dimension and make it update, rather than, OK, I'm going to go use the Stretch command, and make it that long, and so on.

      So there are a couple of things about parametric constraints. They are applied to 2D geometry in AutoCAD. They are not meant to be 3D. Now I have seen some people do some kind of crazy things where they start messing with the UCS, and so it treats the z-axis like an x-axis and can make it work. It's not how it's meant to work. I don't want to say you can't, but these are 2D tools here. And there's really two different types of constraints. We kind of touched on them a little bit, geometric and dimensional.

      So we're going to just talk about geometric in the first place. And you can see some of the definitions that are in the Help from Autodesk. We talked about that sticky OSNAP idea. Bottom line is that we're adding intelligence to the drawing. We're trying to move this away from being just an electronic pencil where we have lines, arcs, and circles and they mean nothing, and put some intelligence on them.

      And I'm sure that's a theme that you've heard about in other classes at AU, of how do we make our drawings and our designs more intelligent? And ideally, that's going to let you think more of this in terms of modeling instead of drafting. We don't want to just be the electronic pencil, like I was saying. If we think about how we're designing the model, how things are related to each other, it has a lot more value.

      So there are a number of types of geometric constraints. Again, I'm not going to read all these to you. You can see, in a lot of cases, how these will parallel a lot of our Object Snaps that you're used to using.

      There are a few here that are unique. For instance, a coincident constraint is basically locking points on two different objects together. So instead of joining two lines into a PLINE, you can just put a coincident constraint on the end of both of them, and they're locked together as if it was a PLINE, but they're two separate objects.

      Now you can lock them to other locations, too. I could lock the end of a line to the center of a circle, or the end of a line tangent to a circle with that. And you'll see there's different options on here like tangent. There's horizontal and vertical. That's one of the things that we used on that widget that we looked at a few minutes ago when it was only allowed to slide up and down like that.

      Fixed constraint. That's going to have you fixed to a particular point in the drawing. So this corner of this object, or this end of this line, is stuck at this xy position. So we're going to look at a bunch of these.

      Now you also have, with geometric constraints, things called constraint points. These are kind of like grips in a way, but they are different. But these are basically the points on an object that you can constrain things to. So obviously, you have things like endpoint and midpoint. A lot of these make a lot of sense here as far as arcs. You have a center point you can work with. Ellipses and circles, you have centers and so on.

      The kind of interesting one is the really bottom one here, blocks, Xrefs, text, Mtext. Basically anything that has an insertion point, that insertion point can be used as a constraint as well. And that's where we can do some kind of interesting stuff with annotation. For instance, if you were told all of our leaders, all of our annotation for our leaders, is supposed to line up vertically in a line, well, you could make those all lined up with constraints so if you move one of them, they all come together as a group, even though they're individual objects because we're based off of the insertion point.

      So there's also some options here for what they call auto-constrain and inferred constraints. Now auto-constrain will let us take an object that was drawn properly with your OSNAPS. Lines are perpendicular or parallel, or they share end points, and basically let you just pick it and say, AutoCAD, put all the constraints on that you can. So it'll kind of do it for you. We'll look at that in a moment.

      And inferred constraints work hand in hand with your OSNAPS so when you snap something together, let's say, that is perpendicular, AutoCAD says, hey, that's perpendicular. I'm going to put a perpendicular constraint on it automatically for you. So it just kind of does it as you go.

      Auto-constrain is one command-- you window things and it puts it on there-- where inferred constraints just works as you go with it.

      So let's try some of these out. Before we jump into that, though, just a couple of general tips when we use these constraints because these are some things that are going to drive us for the rest of the class.

      When you apply a constraint between two entities-- a geometric constraint, in particular, here is what we're talking about-- but when you apply that constraint, if the two objects aren't already ready for that constraint geometrically-- let's say you said, I want to put in a perpendicular constraint-- if the lines aren't perpendicular, AutoCAD has to make them perpendicular, which means it's going to change one of the objects.

      It changes the second one you pick. So you say, pick this line and this line. The second one you pick is what's going to change to become perpendicular. So you'll just get in the habit of kind of intuitively knowing pick the one I like first, pick the one I want to modify second. If you have a bunch of line segments, or lines and arcs, that you convert into a polyline, and they were already constrained, you're going to lose the constraints because we've changed it from lines to polylines.

      So don't join a bunch of lines that are constrained because you will lose them. If you explode a polyline that has constraints, guess what's going to happen? They're going to be gone. So don't explode things that are constrained.

      And what about copying objects? Well, if you copy objects that have constraints, the constraint will be copied with them as long as you copy all the objects involved. So typically constraints, they're a pair. If you copy both of them, it'll bring the constraint along. If you copy just one piece of it, it doesn't have anything to constrain itself to, so it loses a constraint then. So just keep those in the back of your mind as we're looking at using some of these.

      So we're going to jump into our next exercise. I'm going to go back to AutoCAD, and I'm just going to stay in that parametric geometric drawing that we were working on a few minutes ago. And did everybody find a data set? Are we good there, guys? OK.

      So I'm in that same drawing, and we're going to do a few things pretty simple. Remember, I said simple geometry focusing on process here more than anything. We're going to draw four lines, just pan over, zoom over to a blank area, I'm going to use the AutoCAD line command. I'm going to draw four lines that are separate, and mine, on purpose, are going to not look like they are parallel or anything like that.

      But I want to make a rectangle out of those four lines, and I want this to be an actual rectangle that knows it's a rectangle.

      So if I edit it and change it, it stays a rectangle because I'm sure most of you have used the rectangle command in AutoCAD. Draws a polyline that's a rectangle. And it looks like a rectangle until you edit it. And now it's just a polyline that is whatever shape it turned into.

      So I'm going to go through and start by using the coincident constraint. And if you look on your ribbon, go to the parametric tab. So on the parametric tab of the ribbon, the geometric panel is where we're going to be focused. And this upper left small button is the coincident constraint.

      So if I pick that, it says select my first object. So notice when I put my cursor over the object, I'm not typing in an endpoint Snap or anything like that, but I get this red marker that's telling me what the constraint point is I'm ready to select. So as long as you go close to one end, or closer than you are to the midpoint, it just says, I'm going to constrain that end point.

      And then go over and pick another endpoint. And you'll see that line jumps down and locks together. Remember, the second one is what moves. Well, we can just do that same command again three more times. So this end point and that endpoint, and just continue with our different endpoints until we have them all locked together.

      And you might be thinking, well, big deal, Rick. We just made what looks like a polyline. You know, we could have done that before. Curt's very happy. But those are locked together. You might see on your screen, there's a little blue dot at those corners. That means there is a coincident constraint there.

      Let's do something better than that. Go to the geometric tab again and pick the parallel button, which is right below coincident. And then pick one line and pick the opposite line to that that you want parallel. That modifies line number two. Those are parallel. Do that a second time on what should be the two horizontal lines.

      So now I've got a parallelogram, if my old geometry class still sticks. And notice if I start dragging this around, it stays parallel, so that's kind of cool. So geometry-wise, what do I need here? If everything's parallel, everything's connected, if I make one set of these perpendicular, I should now have my rectangle.

      So if we go up to the constraints and pick kind of the middle button there, which is perpendicular, and I pick my first line and my second line, those are now perpendicular. Now if I grab my box, you can see it stretches out, and this actually acts like a rectangle should act. So now that's a little more interesting, hopefully.

      If you wanted this to be completely kind of at a right angle, horizontal and vertical, you can then also pick the horizontal constraint and pick one of the lines, and that will lock it horizontal, so now it will not rotate off of this in any way. And if I just grab a grip on the corner, I can stretch it around and move it. So really basic geometry, but we've set that up.

      Now something else to be aware of. Notice these little toolbar-like things that show up after you've created your constraints that are telling you the constraint is there. If you put your cursor over those, you do get an option when you right-click on it to delete the constraint. That would remove it there. You can also hide it. And here's one of the things. You may end this class and decide, yeah, this stuff was cool, but I really don't have an application for myself. I may not end up using it.

      Now the flip side here is what if somebody gives you a drawing that has a whole bunch of constraints on them? If you don't understand what constraints are and why it's doing this, I mean, it looks like your drawing is possessed. I mean, you move one line, and different things are moving around, and you're thinking all kinds of crazy things with that.

      So these can be hidden. And notice there is a button up here for you on your constraints that says Show or Hide or Show All or Hide All. So if I picked Hide All, these all disappeared. They still work. But if I get one of these drawings, I have no idea why it's doing this.

      So just remember, you can always go up and pick Show All on the constraints to show you those bars. And if you wanted to get rid of them, there's even a big button up here that says Delete Constraints, and you can just window the whole drawing and get rid of everything. So if somebody sent you a drawing, you don't want constraints, you can very easily get rid of that rather than having it drive you and your users crazy with that.

      So just at the very least, being aware of this is important. Yes.

      AUDIENCE: Question about the rectangle. If I wanted to bring that around the center more [INAUDIBLE] how might I go about that?

      RICK ELLIS: With a dimensional constraint on that. So when we get into those, it'll probably make sense with them. I could probably also do it with some other geometry that I put on a layer and turn off or something, too, because we could draw a cross through the middle and connect that to the center points of those lines, and then put a fixed point right in the middle, and that would probably work, too. But as with most things in AutoCAD, there's probably two or three different ways to get to that destination of what you want to do.

      So if we zoom back out, over off to the left of your screen somewhere is this piece of geometry. Now this has no constraints on it, but I want to put some constraints on it, and I'm going to let you guys see if you can constrain it. Now it needs a bunch of coincident constraints at all these corners to lock things together. Probably parallel. Any other things that we might want on this? Any ideas? Horizontal, absolutely. Other suggestions? I'm thinking of one in particular we haven't talked about yet.

      AUDIENCE: Tangent.

      RICK ELLIS: Tangent, yes. I heard tangent a couple of places because tangent is going to be important on that. So take a minute or two and add those and see how you do with it. So I'm going to go through and add a coincident on these corners, and another coincident there, and coincidents on those endpoints. And I'm also going to add that tangent one that we had.

      So I'm going to say this and that should be tangent. That arc and that line should be tangent. And the same thing over on the other side.

      AUDIENCE: You might want to encourage people to show their constraint.

      RICK ELLIS: Yes. If you click the Hide Constraint button, go up and do the Show All constraints just so you can see what you've done with that. That's a good point. I also want to add parallels on those lines. So I'm going to do parallel constraints on these. Now since this was all drawn correctly, I'm really not seeing anything move when I do my second line like we did before. So we should get to where it does something kind of like this.

      Now did anybody try it out and have this happen? One side got way bigger than the other. Anybody end up with that? Or you all did it right in the first place, right? OK. There is another constraint that we haven't talked about yet called equal, where I can tell it, with the Equal Constraint button, make this arc equal to that arc. Now those stay the same. So if I was to grab one of these arcs, change its radius, I can do that. If I add one of those horizontal constraints, we'll get back to horizontal.

      Now notice when I start dragging this around, it's changing the length of the very bottom line, and that angle point is changing, and I'm holding the pivot point in the middle. Well, there's two different ways to try to control that. One is if I just picked the outer line, now it holds that one and the angle point in the center changes. So we could do that.

      Or if you want to hold this outer point, use the fixed constraint. That is that padlock button. If we put it on that corner, it says that corner has to stay there. So even if I drag the middle one around, that end is not going to go anyplace. So I can change the length with that and so on. Later on we'll look at a dimensional constraint, where you could actually put in an angle for this.

      Now this is not a very complex part. And this might seem like it's a little bit tedious to put all of those constraints on one at a time. So we want to look at the auto-constrain command. Let's say it was drawn right. I just want to throw a bunch of constraints on it.

      And one thing that we need to do is check to see if the status bar has the Infer Constraint button on it. Mine does not, but I'm not on the same lab computer as you are. If I go to the Customize button on the lower right corner of your screen, it's the three horizontal lines. Some people refer to it down here as the hamburger because that's probably as well as I could draw a hamburger.

      If you click on that, it shows you all the things that we could put on the status bar. Infer Constraints is the one we want to add. So just click on that check mark, and that will add it to the status bar down there. So I'm going to turn on Inferred Constraints, and it should be this button right here. It kind of looks like a little mailbox, almost, like the little square with a little flag thing coming up out of it. Did everybody find that? Perfect. Click on that to turn it on, basically make it dark or whatever we're saying here.

      I'm sure some of you remember when they actually used to put text on these at the bottom rather than the goofy symbol. Ah, the good old days, when I could just read and say, the one that says Inferred Constraint.

      So let's open up a different drawing. In that same data set folder, we have a drawing that is called Parametric Inferred. And it's the same thing that we just worked on but doesn't have constraints on it.

      So since we just turned on Inferred Constraints, I'm going to draw something using that. And I'm a little bit out of order here. I was going to do auto-constrain first, but this is fine. So inferred constraints are turned on. Now let's draw a rectangle, and let's use the AutoCAD rectangle command. So you can just type in REC for rectangle. And then just draw a rectangle, and look at all the constraints it just automatically put on it. It said, hey, these are parallel. These are perpendicular. I didn't have to go through and pick every single piece of it. It just knew that's a rectangle that works.

      So if inferred constraints are turned on, it's just going to automatically do it. Now you can right-click on the Inferred Constraints button and pick Inferred Constraints Settings, and you can pick which ones are automatically applied. So if there are some that you don't want to do, you can obviously do that.

      I'm just going to cancel for that. And I'm going to go down now and turn Inferred Constraints off. Very important that you turn off Inferred Constraints when you don't want to be using them because you will create constraints all over the place. So make sure you don't forget to turn them off.

      Somebody already drew this other part for me, this plate or whatever it was going to be. And I want to just apply constraints to that. Well, on the parametric tab of the ribbon, there's a button called Auto-Constrain. Go ahead and pick that big button. And if you look at your command line, again, there's an option for settings. So let's type S for settings and just take a quick look.

      So for auto-constrain, it's telling me which constraints are going to be used. It currently has everything except equal turned on. That's fine. Also, there is a tolerance at the bottom that says if objects are this close to being constrained, go ahead and modify the geometry and put the constraint on. So if something was drawn, maybe, not perfectly, this can help automatically clean that up for you.

      Now you don't know which one it's going to change because you're not picking first and second every time. But it may help. Now if you're somebody who says, I do not want AutoCAD to screw with my geometry at all-- I work with surveyors all the time. I get that totally-- change your distance and angle to zero, and it has to be perfect for us to put a constraint on it.

      I'm just going to leave it as is, pick OK, go out and window this object and enter, and it puts all the constraints on for me. So just a little bit faster than that last exercise that we went through where you said endpoint, endpoint, tangent, tangent, parallel, parallel, all through this. We can just window it and boom, we got it. So that makes working with those constraints pretty easy.

      All right. Well, let's move on here and talk about dimensional constraints because this is the other side. This is basically the dimensions that can modify your geometry. Instead of your classic AutoCAD dimensions that just show whatever your geometry is, and they update as your geometry changes, this locks in your geometry, and the only way you can edit the geometry is by changing the dimensional value.

      One really cool thing is you can add equations to these. So you can say things like this line is twice the length of this other line, or this radius equals the length of this line. Or any equation you can think of you can start to put in here. You can really take this a long ways and make one change, and the whole drawing has a ripple effect through it.

      So that will be very cool. Now we can do standard dimensional stuff, align, horizontal, vertical, radial, angular, and so on. We can have certain properties that the dimensional constraints will work with, distances between objects or distances between points on the same object, angles between objects, sizes of arcs and circles.

      And more importantly here, for us, there are these two different kinds of dimensional constraints that are used, dynamic and annotational. Dynamic is basically the default that comes up, and it's more of a design thing. It's more modeling. You don't get the ability to apply dimension styles to them and things like that. And they don't plot. They're just design features.

      However, they can be converted to what they call annotational dimensional constraints, and those do plot. And they display on individual layers, and they use a dimension style. So if you want to use these dimensional constraints as your dimensions that you print, all you have to do is convert them in the Properties palette. And you can go back and forth between them with that.

      So a lot of the same tips when you're talking about dimensional constraints as opposed to the geometric constraints. You have two objects, or two points on the same object. Whichever point you pick second will be the one that is modified. So if you pick two endpoints on a line, and it tells you it's 15 feet, you type in 20. That second point is the one that gets longer with this.

      Obviously, you know what happens if you explode them. Not good things. They go away. If you copy them, if you copy an object and it has dimensional constraints on it, as long as all the objects involved are copied, the dimensional constraint is copied. And like I said, the real cool thing here, the really powerful thing is this equations that you can put in them. So really kind of let your mind wander a little bit with that one.

      So we're ready to go in and actually do an exercise with some of these. So I'm going to go back to AutoCAD. In your handout, this is going to be page 13, lucky number 13. Or actually, it's not 13. It is page 14. And we're going to open up a drawing, very similar, again, just called parametric dimensional or dimensions. And we have, to start with, a rectangle that was drawn just like we did before. But it already has geometric constraints on it. So if you grab that rectangle and start dragging it, you'll see that it updates and stays a rectangle just like we learned previously.

      Now to add a dimensional constraint, we'll go up to the parametric tab, dimensional panel. I'm going to pick linear, and I'm going to do linear horizontal to start. Now rather than just picking the object, I personally like to pick them with two points because I want to control which point is the one that moves. So I'm going to pick this point on the lower left and then go and pick the one on the lower right, drag it down, click a spot for my dimension.

      And it says D number 6 equals, and since I moved it around, it's like 3.49 whatever. I'm going to change it to 5. Enter for that. And you see my rectangle lengthened out to the right until it was five units long.

      I'm going pick the horizontal button again-- or the linear button, and pick vertical, and then I'm just going to go from the bottom up to the top, pick a spot for it, and maybe it will be 2. Now if you try to pick the rectangle after that and start stretching it, notice it just moves and it maintains that shape. I can no longer edit this rectangle by grabbing the geometry and dragging it around because we've told it it's 5 by 2, period.

      If I want to graphically move it around, what I have to do is pick one of the dimensions, and you'll see the little arrows coming out of the end on that dimension. If you then grab the dimension and drag it, you can put it at whatever size you want. You can also just double-click on the dimension and type in a new value like 4.

      Now we talked about equations. Maybe I want the width to be twice the height. So if I go down here to the width, double-click on it, I can type in an equation. Or all I have to do is pick the other dimension, and it says D7. If I just type in times 2, enter. Now that updates anytime that I change the height-- Maybe i change it to 2 instead of 4-- it automatically updates the other one for that.

      So equations are pretty simple. Now I also could have went to the other one and I could have said D7 is D6 divided by 2. You can get there however you want math-wise, and it will work.

      So let's pan over to this bracket thing that we had before. And this one has geometric constraints on it again. See, I can drag it around. But I want to control this angle. I want to be able to type in 60 degrees, 40 degrees, whatever that might be.

      So go up to the dimensional constraint panel, and I'm going to pick angular. I'll pick the first line is the horizontal one. Second line is the angular one that goes up, pick a spot for it, and tell it that I want that, maybe, to be 60 degrees. So that controls that angle. If I double-click on it, change it to 70 degrees, it automatically updates for me.

      So pretty cool. Now again, I can't just grab geometry and start stretching because it knows to hold that angle. So if I wanted to graphically do it, I'd have to pick the dimension and then pick the arrow on the end to do that.

      AUDIENCE: Can get rid of those grip points on the ends?

      RICK ELLIS: Sorry. The grip points, can I get rid of them, was the question. They are part of that dynamic dimensional constraint. Now when we get into things like dynamic blocks with them, we can control how many of those are shown. So more functionality there to come. You're always thinking, like, one exercise ahead of me. This is awesome. You're like Mr. Segue over there for me.

      Now one little challenge thing. I'll give you a two or three minutes to do this. I want to put a circle at end of this bracket. I want the circle to be half the size of the radius of the outer arc, and I want it to be concentric. So what I mean is I'm going to draw a circle like this. Notice I didn't snap to anything. I'm doing this really sloppy.

      And then I'm going to use the concentric geometric constraint and say put that circle at the center of that, and put this circle at the center. Now I also want a radius dimensional constraint on that outer arc. And I'll put another radius on that inner circle. And I'm going to tell it to be that radius divided by 2. And if I tell this to be equal the size of that circle and the size of that circle,

      now all I have to do is double-click on the radius of the outer one, and then we'll change it, maybe, from 0.5 to 1, or 0.1. There they all got smaller. Instead of 0.1, I want it to be 1. Those all got bigger because we said that that arc and that arc were equal. This radius of this circle is half that arc, and this circle and this circle are equal, so they're all tied back to one thing. It's almost like bad Dr. Seuss AutoCAD or something. It's like, you know, this is related to this and this is related to this and this is related to this. When you make the one change, it trickles down through all of them.

      So although the example is somewhat simple, I hope that that's letting you kind of let your mind run a little bit with this and think about what are the possibilities there? How can I set this up so that when I make a change on one of my projects, I don't have to go through so many tedious steps, because if there are things that are relational to each other, can we set those up.

      So let's go back and take a look at our next option here, dynamic blocks. How many of you have used dynamic blocks at some point? Bunch of you. Awesome. I think Tracy might have used them once or twice. Tracy has a class tomorrow, right? Tomorrow on dynamic blocks. So if you want to learn everything there is to know about dynamic blocks, Tracy is your guy there.

      So both geometric and dimensional constraints can be used in dynamic blocks. One tip for you, though, is there are panels in the block editor on the ribbon for dimensional and geometric constraints. For some reason-- which I don't understand because I'm not a programmer. I don't know what they did behind the scenes here. But when you're putting constraints in dynamic blocks, use the parametric tools that are in the block editor, not the ones that are on the parametric tab by themselves. Somehow there's a little bit of a difference, and it just works better when you do it in the Block Editor. So pretty easy thing to do.

      So I want to go through with you and set up a dynamic block and see how constraints can work with that. So let's jump back to AutoCAD. This is page 16 of your handout. And there is a drawing for you to open called parametric blocks.

      And how exciting. It's a blank drawing. So we're going to go to the Insert tab on your ribbon, Block Definition panel. And we're going to pick the Block Editor. And for the block, we're going to go ahead and just name it AU Parametric and then click OK. That'll take us to the Block Editor.

      So all these cool things on this block palette that you normally use for dynamic blocks, we're not going to worry about those in this class. We'll leave that to Tracy in his dynamic block class. He'll wear that one out for us. But notice right up here on the Block Editor tab, there is a geometric and dimensional constraints panels. Those are the ones we want to use.

      So we're going to start by just drawing a rectangle again. So we're going to do REC for rectangle. For our starting point, let's put it at 0,0 because that will be the insertion point of my block. And let's go make this a width of 5. Or actually, it doesn't matter what the width is. Let's just pick a spot because the constraints will deal with this later for us. So we've got a polyline that is like a rectangle.

      Now we're going to go to the geometric constraints. And let's add those geometric constraints like we did before. We don't need to do coincident because it's a polyline. They're already connected. But we do need to put a couple of parallel constraints on here. So I'll do parallel parallel. Do parallel again. And yes, we probably could have used Auto-Constrain to do this. And we'll do perpendicular. So there we go. And this looks like it stretches and does what I would think it would do based on what we learned about geometric constraints. So the geometric end is good there.

      Let's now go to your two dimensional constraints. Let's do a linear horizontal. I'll go from the end at 0,0 to the right end. And let's put in a length of 5, we'll say on that. And then let's go do a linear vertical from the point at 0,0 up. And that one I'm going to say is D1 divided by 2. So it is half the length.

      Now something fun or cool here about the Block Editor is if you make very many blocks, we used to have to insert them all the time, test them out. If they didn't do what you wanted to do, then you go back to the Block Editor and do all this. Well, on the left-hand side of the ribbon, there's a button that says Test Block. That's a shortcut for that. We're going to say Test Block. There we go. And this would react as if we had just inserted it.

      When I pick it, notice there's only one arrow grip. So this comes back to your question. There's nothing at 0,0 as far as an arrow because we're only going to stretch to the right. And any idea why we don't have one vertically? It's equation, right. I heard equation out here someplace. Yeah. So if we didn't have an equation, yeah, there would be one vertically we could use. But since it's an equation, the only way it's going to get that vertical value is by the horizontal. But it should move around like this.

      So far, that's what our block does. If I was to insert my block, I would have one grip, I could grab it, and it would just stretch that whole object proportionally. So kind of cool. Let's pick Close Test Block, so that's the green check mark. That takes us back to the Block Editor, where we can continue to do some stuff.

      And because it's a block on that dimensional panel of the ribbon, we have this thing called a block table. So if you pick the block table, at the command line it says, pick a location for it. Well, I'm just going to go somewhere down kind of near 0,0, doesn't matter where, and just pick a spot. And it says how many grips do you want to show? One is going to be perfect. So I'm just going to enter for that.

      It then brings up the block parameters table. So what this is saying is what are typical values that you might want to put in here? So kind of presets is really what it is. If you pick the green function button that is over on the far left of the block, properties table dialog box, I'm going to tell it I want to work with D1, in this case, the horizontal. So D1, click OK. Here is this column for D1.

      And for D1, I'm just going to put in some values. I'm going to type in 2, enter, go to the next line. Maybe we'll do 4, 5, 10, whatever values you want. Doesn't really matter. Just put in some. Then click OK.

      Now let's go up and pick that test block command again over on the far left side, see what happens now. Now when I pick the block, there is this little down arrow grip, which I can pick this, and here are my different values. So I can say what's it look like at 4? Switch the block over to 10. Switch it to 5, whatever you want to do. You've got predefined sizes of your part or whatever it is that you have made there.

      Now you still have the option to select the grip and drag it to some other weird size. So I'm not snapping to anything here, so I'm non-standard. I would have to go back and then pick one of these to fix it.

      So the last step in this is I want to constrain that only to those values because those are the only valid ones. So I may pick Close Test Block, go back to that same button that was Block Table. It remembers everything we did. But I'm going to check this box that says block properties must match a row in the table.

      Now the one thing that is important here is that we need to have drawn this currently to match one of those rows in the table because it will freak out a little bit if you don't give it a solution right there. So once you check that box, pick OK. Let's go back to test block one more time. We'll pick this.

      And now I still have these options in the dropdown, but when I graphically stretch it, it's probably kind of hard to see, but there are little white tick marks out here showing the actual valid values. And it snaps me to each one of those. I can't pick a spot in between. So now what was in my table, or in my list, is the only thing I'm allowed to do.

      So this was a very simple example, but you can probably start to visualize how complex you could make this if you wanted to. All we would have to do is close the test block, close the block editor, save my changes. And if you wanted to insert that block, it would work just like it did in the test block from there.

      I could type I for Insert, bring up the new pallet that inserts things in my current drawing. Here is AU Parametric. I put it there, and when I click on it, there's my options, or I can manually stretch.

      So dynamic blocks is where it gets really cool with that. We really can start to do some powerful stuff. Yes, sir.

      AUDIENCE: [INAUDIBLE] arrows pointing down [INAUDIBLE] parameters. Can you have parametric [INAUDIBLE]?

      RICK ELLIS: Yeah. Honestly, I have not tried that. The question was, can I have more than one visibility state and parametric values in each one? Tracy, have you guys tried that out? I haven't tested-- yes, sir.

      AUDIENCE: So the one inch is the table, it's not a visibility state?

      RICK ELLIS: Correct. It's not a visibility state. That's just a--

      AUDIENCE: You can't have a table and a [INAUDIBLE]?

      RICK ELLIS: Yeah. But I guess the question is, can you have multiple, one in each visibility state? And that's what I'm not sure of. I haven't tried a table in multiple visibility states. That would be cool. If you try it and it works or doesn't work, shoot me an email, say, hey, because I'm curious with that.

      AUDIENCE: You probably have to draw your geometries separately in each visibility state and have a table associated with it.

      RICK ELLIS: Yes. I would assume.

      AUDIENCE: [INAUDIBLE]

      RICK ELLIS: Yes. But I'm not sure that they would even then be able to all coexist peacefully.

      AUDIENCE: [INAUDIBLE]

      RICK ELLIS: Exactly. And this is one of those tools that you can take it a long ways if you can keep track of all of that stuff yourself. I mean, it does get complex.

      So all right. We've got a little under 15 minutes. I want to show you two more things here real quick because we'll kind of do something cool here. So page 20. We're going to put together this entire widget that we had before. So if you open up the drawing that is right in your main data set here that's called Widget Assembly.

      And it looks like this to start off with. Basically I've got all of these pieces. They're just blocks. That's all they are. And we want to start adding constraints to that. So I'm going to do a fixed and a vertical constraint on the slide rod.

      So I'll go to the parametric tab. I'm going to do a fixed constraint just so it doesn't move around at all. And I'm also going to say it has to be vertical. So that thing's not going to move or rotate.

      Then I'm going to add a fixed constraint to the motor, and I'm also going to add a horizontal constraint to the motor, to that horizontal line at the bottom, because I don't want it to move or rotate. They're both locked into position.

      Now we want to put this widget slider on the slide rod. And we're going to do it with a dimensional constraint, say, half a unit off to the left. But to do that, we need to move it to the left first because if I did half a unit to the left, it would put it off to the right instead. So we just need to get on the side we want it to be on, and then do a linear horizontal constraint.

      And we're going to put that from, we'll say, the left side of the slide rod to-- I'm going to use an insertion point Snap to grab that end. Slide it down, put it here, and type in 0.5. So now that guy is locked in something like that. So now that thing is locked it's on the slide rod.

      Next piece of the puzzle here is we're going to put a coincident constraint on the center of the motor and the motor arm. So coincident constraint. We'll go from the center there and the center there. Those know they need to stay together.

      Then we're going to do the same thing, coincident constraint to the center of the circle on the widget slider, and the center of the circle on the widget arm. Let me get that there. And I missed the first one, so I need to pick it again. So it goes from number one, number two.

      Now the only thing we need to do is put together these two holes. So we're going to use another coincident constraint and use the center of that arm and the center of that arm. Now what did I forget? Vertical on this guy, probably, right? So if I go back and say, use a vertical constraint on that line, pick that, now they line up correctly.

      Now when I pick it, drag this up and down, they move like they're supposed to. Depending upon how you had things laid out, you might have got that arm flipped over back on the inside. Did anybody get that? Or you all did it right. So once in a while, mine flips over on the inside like this. All you have to do then is just use the AutoCAD Rotate command on one of them to get it to rotate around properly.

      But basically we just took five different blocks and just tied those together with a few constraints so that we have what looks like a part that is all working in dynamic with each other.

      So how'd we do there? Good? Cool? All right.

      Last thing that I'm going to show you-- then we'll kind of recap things and we'll give away Tracy's book as well-- we talked a little bit about constraints with annotation. This is a bonus exercise because you guys did so well and got this far. So it's not in the handout, but I'm going to walk you through it real easily.

      Open up a drawing called Callouts. So this drawing, called Callouts. I purposely have the callouts kind of scattered around all over the drawing. I'm sure a few of you have worked with somebody who is anal enough to say those callouts all have to be lined up no matter what. Please get that done. I'm not going to even look at it until then. Right? I'm not the only guy who had that fun experience.

      Well, we can use constraints to make this easier. I'm going to draw a line. Now this is a line that I would probably put on a layer that I would make a no plot layer, or even freeze it or turn it off. I'm going to take that line, make the line vertical with a constraint. And it doesn't even have to be very long. It can be a very short line. It could even be off the page.

      Then I am going to use the coincident constraint, and at the command line, there's an option here of object. So I'm going to say object. I'm going to select my object. And then it says select a point or multiple. This is where I'm going to do M for multiple, and I'm going to pick all of the callouts that I want to be lined up on that line vertically, and then enter.

      And check that out. Ooh, ah, there we go. Now that's not the fun part. If I pick any one of them and move them, they all go together because we told them you were all aligned along that little tiny line that I had, as if it went infinitely off into space. So it's a coincident constraint with the object option is what we did.

      So for your anal reviewer who looks at that and says, oh, well, I'm not even going to look at whether your design was right. The callouts don't line up-- you laugh, but I've worked with guys like that-- this takes care of that on there. So just another different way to use constraints within that.

      So let's recap a little bit. Things to remember. And if you remember nothing, you probably remember that from the class because it's kind of hypnotic.

      Basically, the geometric constraints, kind of like sticky Object Snaps. The second object is always the one that's changed. That's the big deal. You pick the one you like first, pick the second one to modify. And then dimensional constraints lets you change things by moving by entering the dimensional value, and they can have those equations in those.

      So we wanted to give away one of Tracy's books for the class. He probably would even sign it for you in the back if you want to embarrass him. I gave out business cards to people, hopefully, as they came in, or they were given to you by the person who was checking you in at the door.

      On the back-- Tracy, pick a number between 1 and 5.

      TRACY CHADWICK: 3.

      RICK ELLIS: 3. That was exactly between 1 and 5. Good job. He's an engineer. Does anybody have a number 3 written on the back of yours? You are our winner. Congratulations.

      Thank you all for coming out and for your time, attention, and everything. Hopefully this made you think a little bit. And have a great rest of AU.