Revit MEP Forum
Welcome to Autodesk’s Revit MEP Forums. Share your knowledge, ask questions, and explore popular Revit MEP topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Revit parametric coloring

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
revitworkbench
7893 Views, 6 Replies

Revit parametric coloring

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!

6 REPLIES 6
Message 2 of 7
CoreyDaun
in reply to: revitworkbench


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!

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!
Message 3 of 7
revitworkbench
in reply to: CoreyDaun

Ok, so I got the Insert Nested families to change out properly, however, when the duct Size changes, the dimensions or restraints that I use to keep them in the right spot get deleted and then they are no longer in the right spot. (height and width) It seems like once it gets switched out, it loses its proper alignment associations. Any ideas how I can tie all consecutive nested families to the same constraints?
Message 4 of 7
CoreyDaun
in reply to: revitworkbench

Can you attach your current family?

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!
Message 5 of 7
revitworkbench
in reply to: CoreyDaun

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!!

Message 6 of 7
jmendezicce
in reply to: CoreyDaun

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

If this helped solve your issue - remember to 'accept as solution' to help other find answers!
----------------------------------------------------------------------------------------------------
Si esto ayudó a resolver su problema, recuerde "aceptar como solución" para ayudar a otros a encontrar respuestas.
Message 7 of 7
CoreyDaun
in reply to: jmendezicce

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))))

Corey D.                                                                                                                  ADSK_Logo_EE_2013.png    AutoCAD 2014 User  Revit 2014 User
──────────────────────────────────────────────────────────────────────
⁞|⁞ Please use Mark Solutions!.Accept as Solution and Give Kudos!Give Kudos as appropriate to further enhance these forums. Thank you!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report


Autodesk Design & Make Report