Thursday, March 20, 2008

How to get (and get rid of!) drag handles in families

So we'll stay on the topic of family editing once again...

One of the first valuable lessons I learned in family editing is that you can make a family (in the project environment) display drag handles in order to resize it interactively without having to visit the dreaded Properties dialog. And who wouldn't like that?! The concept is very easy:

a) In a family template (let's pick a Generic Model), create an additional Reference Plane parallel to the Center (Left/Right) plane. By default, this will come in as a Weak Reference. We'll leave it alone for now.

b) Create a symbolic line from the Center ref. plane to this new ref. plane.

c) Now select the symbolic line and notice two open padlock icons at each end where they coincide with the ref. planes; click on them to lock the constraints.
d) Add a dimension between the two ref. planes. Now select the dimension and on the Options bar, click the Label drop down and select "Add parameter".

e) Type a parameter name and select a group. These are not really important for this example. What is important is that we make this an instance parameter. For the sake of this example, let's call it "Length".

f) Load the family into a project and place an instance. Select the instance and you'll get the following:



When you push or pull on the drag handles, the length of the line changes. We're basically modifying the instance parameter in the family that we called "Length" without having to visit the properties dialog box. You can also use the align tool and it would find the references within the family and resize the line accordingly.

Now what if you don't want the drag handles? You have a couple of options:

a) Make the "Length" parameter a Type parameter.

b) Change the ref. planes in the family to "Not a reference".

Both these will achieve the desired result, but are not always viable. If you want to keep the parameter as an Instance one, then (b) is probably your best course of action. But once again, what if you want to use the align tool to move the family in alignment with something else? If you set the reference plane to "Not a Reference", the align tool will not "see" these planes in the project environment.

So here we come to the last tip (and the real purpose of the post). Let's go back to the family. We're going to combine option (b) that we just discussed with another little trick. So we have two references which can be seen by the align tool in the project environment: a "strong" reference, which is the "Center (Left/Right)" and the weak reference we drew initially. Let's draw two new ref. planes and make them "Not a Reference". Now we lock the symbolic line to these new ref.planes. Place a dimension between the original ref. planes and the new ones and you'll have the following:

One other crucial step is to edit the witness lines of the label to assign them to the new ref. planes. Alternatively you can delete this label, place a new dimension and re-assign the label. Whichever way you choose, continue the following steps before re-assigning the label. Now select the new ref planes and the dimensions will turn blue; type in a length of 0 and the ref. planes will overlap. We could have aligned and locked these ref. planes, but then you wouldn't really know you have overlapping elements. This is just the method I choose so it's clear that I'm purposely constraining overlapping elements (not everyone knows to turn on automatic sketch dimensions!). Finally, re-assign the "Length" label.

When you load this family back in the project, you'll find that you can still use the align tool, but now the whole object will move as a whole rather than resize. To resize, you'll simply go to the Properties dialog and change the instance parameter value. Where do I use this technique? Door families are the prime example. We like to have instance widths for doors, but we couldn't use the align tool as it would resize the door instead of moving it. This technique enables us to have it both ways ;) Hope you also find it useful in your family building endeavors.


Share/Save/Bookmark

5 comments:

Anonymous said...

Dave,
Unreal tip! Keep it up! I am a daily reader of yours!

Thanks again!
JB

Dave Baldacchino said...

Thanks JB :) Good to know it's useful to someone besides myself!

Anonymous said...

The last time I posted a comment I had bookmarked this. I found a great use for it today, combining it with one of Steve's tips. Thanks again!
JB

Dave Baldacchino said...

Sweet! Glad you found it useful.

MAHMOUD ANTER said...

Thanks..Thanks...Thanks

Post a Comment