I'm trying to do something that has ended up giving me far more trouble than I thought it would; mainly because of my unfamiliarity with Revit. Initially I was trying to use an algorithm to search through the users drawing, find valves, check if they were open or shut, and then draw a halo/ring around them. Then I was told to do it through the families. So, I opened Revit, created my rings, and now I'm at the point where I'm trying to apply them, but again: Unfamiliar. I'm right here:
The Valve Shut property is Shared. I want to implement the Valve Status based on whether the Valve Shut is true/false. It gives me a bunch of different error while I'm trying to do this because there's no documentation (I've found) on how to do this. Does anyone know? Help me Obi Wan Kenobi!! You're my only hope (of closing this task)!
1 Answer
I discussed this with the development team with the following responses:
A. To avoid scaring off the masses that may think this is an MEP specific problem, I think it can be generalised by saying what you’re trying to do is set the value of a type of parameter based on the value of a Yes/No type of parameter. Or, maybe even more generally, how do I use a formula to set the value of a type of parameter.
B. Sorry, text values in formulas is currently not supported, though it has been requested.
C. If I’m not mistaken the accepted “solution” is to use the following steps. Ugly, but it should work.
- Create a parameter for each type you want to use and assign the type in the drop down. I'll use "Family Test 1" and "Family Test 2" for the demonstration.
- Create a parameter that you will use to label the element in your model. In your case ”Valve Status".
- Create a yes/no parameter. In your case “Valve Shut".
- Add an IF statement to your "Family Test Control" parameter; if(Valve Shut, Family Test 1, Family Test 2)
You can add some seriously crazy IF statements to control more than two types but it really depends on your needs as to how it would be structured. I'm envisioning lots of ANDs and ORs that can be added, as well.
1