Tổng số bài gửi : 1597
Points : 3608
Reputation : 193
Join date : 07/04/2009
|Tiêu đề: Visibility Control with Yes/No Parameters 20/5/2011, 11:19|| |
By Revit TotD – 3.17.09
Another TotD courtesy of the RevitCity chatroom. This one is something I hear asked a lot almost anywhere I go. It delves into the family editor, which if the sound of that scares you, it’s just how us reviteers say “Open a family file (.rfa) with revit.” The goal of this tip is to show you how to make a parameter in a family which contorls the visibility of an object in the family.
For this example I’m going to show a very crude window… cut me some slack, I’m doing this around reading and design work for school. So in this window, there is a mullion that I don’t know if I need in all the windows. Maybe some windows want 2 lites, while others only want a single lite. So I want to control whether or not that mullion is there. Here’s how you do it
- Go to the Family Types dialogue.
- Add a new parameter
- 1) Name your parameter, i called mine Mullion On. Be appropriate with your parameter names so that someone knows what the parameter is for when you are not there to explain it.
2) Up to you, there are only a few appropriate parameter categories. I usually use Identity Data, Construction, or Graphics for this type of parameter.
3) Select “Yes/No” from the Parameter type. Otherwise this will not work AT ALL.
4) Whether this is an Instance or Type parameter is up to you and is the scope of another TotD. Basically, do you want to have to change family types in order for this parameter to be used? If No, then use instance.
- Hit OK a couple of times till your back to the canvas. Select your object (in this case, my mullion) and go to the properties.
- You will see a parameter called “Visible.” To the right there is a blank button under the “=” column. Click it to link the Visible parameter tot he Yes/No Parameter.
- Select your parameter from the list of parameters to choose from. Note that this dialogue knows that the “Yes/No parameter type is the only parameter type that is compatible with the Visible parameter.
- Hit OK
- You’re DONE! You can test if it works by going back into the Family Types dialogue and toggling the Mullion On parameter. If the object greys out, then you are in business! The video demonstrates this working in a project.
Well there you have it. Once again I hope this helps you in some form or fashion. I made my parameter as an instance parameter so you don’t have to change the family type to control the visibility, but you can make it a type parameter to fit the needs fo the family you are working on.