Showing posts with label constraints. Show all posts
Showing posts with label constraints. Show all posts

Friday, March 31, 2017

Edit Profile and Altering Base or Top Constraints

In this example I've got a veneer wall and I used the Edit Profile feature to alter its shape. I wanted it to go from the bottom of the building to the top but provide the overall opening it requires in the middle. As luck would have it the overall height has changed a little. The selected wall in the following image is one of several veneer wall segments. It needs to drop down by 6 inches.


All I need to do is edit the Top Offset parameter, changing it from 3'-6" to 3'-0". That was easy.


Unfortunately when I do that easy bit I notice the opening I created using Edit Profile has shifted down by the same 6 inches.


At this point I'd use Edit Profile and move that sketch segment back up to the proper location. Since I have several of these veneer walls to adjust; for one of them I accidentally used Edit Profile first. I decided to change the Top Offset parameter while I was there, noting that the sketch is still correct at the top of the window assembly.


When I finished Edit Profile I was pleasantly surprised to find that the sketch remained intact, the opening did not need to be altered. The Top Offset alteration took effect without changing the interior rectangle sketch like would have happened changing the parameter outside of the Edit Profile mode.


That was a pleasant thing to stumble into. For the remaining walls I just used Edit Profile first and changed the Top Offset parameter followed by finishing Edit Profile without having to adjust the sketch too.

Wednesday, December 17, 2014

Revit 2015 R2 - Reveal Constraints

A new view override feature called Reveal Constraints is part of the subscription only R2 release for Revit 2015. It is intended to make it easier to see constraints that have been applied to the model but may have been obscurred in some way. For example it is possible to use a padlock on a dimension string and then delete the string, ignoring the warning message and clicking OK to accept it but retain the constraint. Clicking the sneaky little dimension string with a padlock icon on the View Control Shortcut bar reduces the model to gray/halftone and displays constraints in a burgundy color, like below where I've locked a couple dimension between Levels.


Even constraints that are related to elements within a sketch are displayed but they are also gray or halftone. You can double-click to edit the element, if you have that feature enabled, or edit the element and then remove the constraint(s).

I've embedded the following video, which you'll find within Autodesk's help documentation.

Tuesday, May 13, 2014

Where are the Constraining Dimensions

When you edit a family that someone else created you may encounter a situation where the constraints that control it aren't readily visible. Yeah, it could even happen to you with content you created. These are a few things to consider when you start hunting for them.

Inside the Sketch - It is possible to add dimensions and parameters to control solids/voids while editing their sketch. If that's been done you won't see them unless you edit the sketch for that solid/void.

Associate Family Parameter - The little sneaky gray button (that has a tool tip since 2014) allows us to constrain some things without an actual dimension in canvas. We just connect the dots between the parameter of the form with a parameter.

Automatic Sketch Dimensions - These kick in when you start creating parameters and elements without tying them to anything specific. Revit guesses what you have in mind. They'll usually only be visible while you are editing a solid/void. They are definitely off by default in Visibility/Graphics. You'll find them under the Annotation Categories tab. I've written about these in the past.

Choice of View - Sometimes the dimension isn't in a view that we'd expect it to be in. For example the stock door template has the width parameter in an elevation view instead of the plan view. I certainly wouldn't expect to find it there. I try hard to put X/Y oriented dimensions in plan views and Z oriented dimensions in elevations, usually Front but occasionally Right.

Visibility/Graphics - Sometimes dimensions are just turned off in the family's views.

2014 Revit OpEd

Wednesday, October 09, 2013

EQ Constraint without EQ

Another question via email: "I want a column that can be defined as equal width on either side of its center line but occasionally I'd like to be able to make it unequal. Is there a way to toggle on or off the EQ (Equality) constraint in a family's dimension from the project?"

It isn't possible to toggle on/off the behavior of the EQ constraint when we apply it to a dimension string. If we ignore that feature we CAN define two parameters for either side of the center line of the column and when we need them equal we can supply the same value to both. When we need it to be unequal we just provide different values. Same result, just a different way of looking at the problem.

Here's a mockup, one way to tackle it, I'm sure there are other ways, other assumptions we could make. In the first image the Equality requirement is "OFF". The conditional statements in the formula column evaluates when the "Make Equal Width" parameter is on or off and the "Width Primary Side" parameter provides a value to define how much the inequality should be, based on a notion of primary side and secondary side width values. We subtract the "Width Primary Side" value from the "Width" parameter to shift the column over.


This next image is based on the "Make Equal Width" parameter being "ON" and we divide "Width" by 2.

Tuesday, November 27, 2012

Rounding Length Values

When you create formulas in the Family Editor or perhaps in a schedule you can use the relatively new Round, Roundup and Rounddown options. They are designed to be used for unitless values. How often do we use unitless values? Click if you want to read the info at Autodesk's WikiHelp.

The other night I wanted to divide a panel height but round off the result. Take a door panel that has 6 lites that are defined by equal height from the top of the panel for example. One approach would be to just make the spacing equal. In this case the last lite is where the "slop" is supposed to go by making the upper lites equal in size. This means that the last lite is a little different size but then the bottom rail can be changed regardless of the lite sizes, without altering them.

The formula ended up looking like this:


In plain English, I add the top and bottom rail height together, subtract that from the panel height, divide by the number of lites. The rounding is applied to that result and divided by the desired rounding unit (1") and finally to satisfy Revit's quirkiness multiply the result by 1" to redefine what the units are. A bit round about (pun intended) but got where I wanted to go in the end.

Quick tip: When you add a parameter, click Apply before trying to fill in a formula. Revit needs to "save" the parameter before you can start using a formula in it. You'll typically get a message: "Can't find solution for formulas for type", wrote about this back in 2009.

Thursday, November 08, 2012

Two Minutes with Constraint Quirkiness

Okay it's a little more than two minutes but less than three. I've been running into a few things lately that I don't recall being an issue in the past. Then again maybe my memory isn't what I thought it was? Take a look at this image. Seems pretty straightforward.


I've got a pair of Reference Planes that I want to keep positioned on either side of a rail (as in stiles and rails for a door). In the past I could do what you see and then use the dimensions on the right to shift the collection of reference planes up or down a bit. Now I find that I can't unless I select all three together. In the past I just grab the one in the middle and use the referencing dimension to shift it up/down. Doing that now gives me some weird results. It's probably better and easier to explain it with a video so here's one at You Tube.


Thursday, September 27, 2012

Family Types Dialog - Lock Parameter

This concept showed up a couple releases ago if I recall correctly. I'm referring to this bugger:


The help file says:
    "You can maintain the parametric relationships between labeled dimensions by locking them. To lock a dimension directly in the drawing area, click next to the dimension."
    "When a labeled dimension is locked, all of the associated parameters also lock. This means that as the dimensions are moved in the drawing area, the associated parameters are constrained and the dimension value is preserved."
    "Note: Locked dimensions and their associated parameters cannot be changed in the drawing area. Use the Lock column in the Family Types dialog to change them."
    "When a labeled dimension is unlocked, all of the referenced geometry unlocks and is unconstrained."
    "To lock a labeled dimension from the Family Types dialog
    • Click a dimension in the drawing area.
    • Click Modify | Dimensions tab | Properties panel Family Types.
    • Select Lock to constrain a parameter."
I find that this part isn't true:
    "Note: Locked dimensions and their associated parameters cannot be changed in the drawing area. Use the Lock column in the Family Types dialog to change them."
When I select a dimension string that has been locked I CAN change the value and flex the geometry. What I CAN'T do is drag a reference plane to alter the parameter value "in Canvas". The text is misleading. It sure sounds like I can't alter the parameter at all, except by opening the Family Types dialog.

Another thing that is a bit confusing. In the project environment we can't change the position of elements by selecting a dimension string first and then editing the value. We CAN do that in the family editor. Inconsistent user "feedback" when transitioning to and from. In the project we keep stressing that we must select the element and then edit the dimensions. Exactly the opposite when a parameter is attached to the dimension in the family editor. Uh oh, I just saw a student's head explode...sorry.

    Saturday, August 18, 2012

    Constraining Tangents

    I read a post at AUGI the other day which originated with a post in July (2012). The goal was to create a rebar shape for detailing purposes. A few people offered ideas even a file or two. It seemed simple enough to do but digging into it I found several variations in a theme to constrain the geometry works. Here's my exploration captured in these images.

    This image is the overview of what parameters are desired: Length, Depth, Fillet Radius and Angle.


    Simply sketching the "bones, muscle and skin" is often enough. In this situation, as you flex the parameters the tangent arc starts to distort eventually. Revit does not understand how to respect the arc and line end points, keeping the lines tangent to the arc. That means it needs more constraints. One way to see how well Revit understands our intentions is to turn on Automatic Sketch Dimensions (ASD's).


    When you see little blue dimensions you know that Revit doesn't understand you, you need to be more explicit. If you look closely at the very last image you'll a single ASD (showing 0'-0") along the vertical reference plane. Unfortunately just getting rid of ASD's with better constraints isn't a guarantee for success.

    This image is the messiest solution, I used a circle to "see" how the geometry moved around and then used it to create enough constraints so that it flexes correctly.


    This image is a variation on the previous theme but using Reference Lines as the underlying "bones", pretty "messy" too eh?


    This is yet another approach. I used a pair of model lines (assigned to Invisible) to govern the location of the arc and line endpoints.


    This final one is the simplest in appearance but it has two line segments instead of one along the angled segment. I noticed that connecting the end of the angled line would break the relationships. I tried pulling the end of the line away from the end of the arc, leaving them apart, and flexing geometry worked. That led me to try a second line between the end of the arc and the end of a smaller line and it worked too. Not obvious at all. It also means that the family will break if one of these segments is flex too far, assuming the changes result in a zero length segment. The family will break easily anytime the angle entered creates a zero length segment of the vertical line too (all of them, not just this one). Fragile but the family works.


    In the thread at AUGI the member that started it all replied that he figured out how to solve it after reading a post at BIM & BEAM. I tried using the formulas as well but found it was necessary to play the "two lines instead of one trick" to get it to behave.

    If you'd like to play around with the families I created doing this I've posted them HERE. I'd be interested if anyone can find simpler solutions.

    [Edit 08/20/2012: Alfredo Medina shared a solution at the AUGI thread that uses formulas to define the relationships consistently. CLICK to watch his video of it flexing. CLICK to download his family. (You'll need to log into AUGI to download it most likely)

    Saturday, December 31, 2011

    Show Your Constraints

    In Revit we can apply constraints (padlock and EQ) using dimensions. These dimensions can get deleted and if the person doing the deleting doesn't respond to the warning well...the constraint remains intact without any obvious visible evidence.


    Choosing Unconstrain will eliminate the constraint when the dimension is deleted. Unfortunately many users just click OK, leaving the constraint to come back and bite someone later, maybe themselves.

    For example, years ago, a friend started modeling a tall building. He locked the distance between a few different floors and then later deleted the string. Eventually he needed to change the floor to floor height and Revit crashed. I took a look at the model. When I used Zoom to Fit in an elevation view I noticed that a little padlock appeared when I selected a Level. Revit tends to display the icon for a constraint at the opposite end of what is being examined, usually off screen unfortunately (less clutter with other icons is my theory). Using Zoom to Fit meant I could see the whole level, and the constraint icon, like in this image at the far left.


    Software programmers "comment their code" so that it is easier to figure out what a section of code is intended to do later. It's etiquette, good practice, nice... Half the time it's self serving too. I've returned to some code I wrote months or years later pleased to find my own comment helping me remember why I did "that".

    To mimic this notion of "commenting our code", I frequently suggest that if this sort of constraint is really important then consider making a duplicate view called Level 1 - Constraints (or somesuch). Lock and constrain it there. With this special view any/everyone can see the constraints anytime they want and see why they are there because you can add a note saying so.

    Tuesday, March 03, 2009

    Dept. of Subtle - Matchline Constraints

    Patrick Paige, an associate with Perkins & Will in Charlotte, NC, wrote to me suggesting this item fits into this department nicely. He wrote:

    When adding matchlines something was bothering me about the parameters. I realized that they flipped the locations of the “Base Constraint” and “Top Constraint.” For walls, shafts, etc. the order is bottom-top. For matchlines the order is top-bottom.

    I agree...subtle. I recall something else that is different in this way, perhaps it is the wall opening tool. I'll have to check!

    Friday, August 29, 2008

    Double Negative - Equality Constraint and Padlocks

    This one trips up new family editors as well as project modelers but I see it more often in the context of the family editor.

    When you create a dimension string between three or more elements Revit displays the EQ icon/control/grip/toggle.


    Clicking on this EQ icon will create a constraint between the elements that tells Revit that you want the spacing between each of them to remain equal at all times. This assumes that you intend to "flex" or change the distance between some of them or the overall distance at some point. Thus the reason I encounter it with family editors more often.

    At the same time the Padlock icon/control/grip/toggle shows up underneath each dimension value.

    You DO NOT need or want to click on the padlocks, which locks the dimension value. Doing so is similar to a "double negative", like, "I ain't not going to do that?"

    Poor Revit is confused when you do this because you just told it to make sure the distance between each element should remain equal. Then you told Revit not to change them either! Adding a dimension and parameter to allow for flexing them makes matters worse! Up till now Revit tolerated your mistake...but trying to change the parameter will push Revit too far, it snaps and "yells" at you!



    I suggest that we might be better off if Revit did not display the padlocks when the EQ constraint is invoked? In the meantime, just remember, double negatives ain't good English and it isn't not good for Revit neither.