Is it possible to associate coloring as a parametric parameter in a revit family? Meaning, if this family is this size color it blue, or that size color it red and so on. If so how? Also, I dont think that will completly solve my problem. I want to create hangers which show Inserts on the top of the hanger. However difficult it is to get the bang-it inserts to show an flex properly, I run into only a partially flexible spring because revit falls a little short in its helix making capabilities when you try to make it parametric. Therefore my only other option is to create a separate, fully developed (non-parametric) insert family (with the spring inserted as a dwg, converted to a rfa), and load it into the hanger family. However, I would have to insert several bang-it inserts, into each hanger family because they type of insert varies by the size of the hanger. I want to know how to parametrically swap in/out the appropriate nested insert family in the hanger family, based on the size of the hanger, determined by the ductwork in the project. Thanks!
Solved! Go to Solution.
Solved by CoreyDaun. Go to Solution.
michaelmead wrote:"Is it possible to associate coloring as a parametric parameter in a revit family? Meaning, if this family is this size color it blue, or that size color it red and so on. If so how?"
Not directly, aside from assigning Material to different nested Families. Here are two means of controlling color (which aren't perfect by any means):
1. If the Family is NOT nested and will be directly placed in the Project, you can create a Shared Parameter with a formula that determines a color via a 'number scheme' or with text. In the Project, you can create View Filters that correspond to each value of that Shared Parameter (defined under 'Rules').
2. If using a Nested Component, you can create multiple instances of it in the same place and make each a different color and control each Component's visibility with a Yes/No Parameter. You can create formulas to control these Yes/No values as desired.
michaelmead wrote:"...Therefore my only other option is to create a separate, fully developed (non-parametric) insert family (with the spring inserted as a dwg, converted to a rfa), and load it into the hanger family. However, I would have to insert several bang-it inserts, into each hanger family because they type of insert varies by the size of the hanger. I want to know how to parametrically swap in/out the appropriate nested insert family in the hanger family, based on the size of the hanger, determined by the ductwork in the project."
This should be possible. First, load the desired Families and/or Family Types loaded into a host Family. Create a 'master' <Family Type> Instance Parameters that corresponds to the Category of the loaded Families. Now, create a 'dedicated' <Family Type> Instance Parameter for each possible Type. Now you can create a formula for the 'master' parameter that selects one of the 'dedicated' parameters based on the Duct Width (or whatever). For example:
= if(Duct Width < 7", Hanger1, if( Duct Width > 12", Hanger3, Hanger2))
**In the above, "Hanger#" are the names of the 'dedicated" parameters.
After closing the Family Types dialog, place one instance of a nested Family where it's supposed to go, but make sure that you insert the same Type that is listed by the 'master' parameter! After placement, select it and set "Label" (under properties) to the 'master' parameter. This will create a link between the Type and the chosen parameter.
Don't hesitate to ask if you have any questions!
Thanks, but i just got it to work!! I am currently trying to manage my nested if statements, but its scheduling properly and everything. Thanks soo much!!
1. If the Family is NOT nested and will be directly placed in the Project, you can create a Shared Parameter with a formula that determines a color via a 'number scheme' or with text. In the Project, you can create View Filters that correspond to each value of that Shared Parameter (defined under 'Rules').
what is the syntaxis of the formula?
thanks a lot
It depends on what you want the formula to do, but the most likely setup is a series of nested if/then function. For example:
= if(length_param > 4', 4, if(length_param > 3', 3, if(length_param > 2', 2, if(length_param > 1' - 0' 6", 1, 0))))
The above formula would be applied to an integer-parameter, and would return a value based on the value of the referenced length parameter. In this case, if the length parameter is 2'-1", then the integer parameter would return a value of 2. This value can then be utilized by View Filters in the project to assign the desired appearance.
In case the dynamics of nested if/then functions is unclear, the formula below is colored to indicate each functional step of the formula. Each colored segment represents an if/then function which is nested into the previous as the "else" or "if false" statement. For example, the orange segment (which is a complete statement with the zero at the end being its "else" statement), is nested into the green segment and is only relevant if the green conditional statement returns false.
= if(length_param > 4', 4, if(length_param > 3', 3, if(length_param > 2', 2, if(length_param > 1' - 0' 6", 1, 0))))