Boolean Family variables

Boolean Family variables

Anonymous
Not applicable
809 Views
3 Replies
Message 1 of 4

Boolean Family variables

Anonymous
Not applicable

Hey all,

 

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:

 

FamilyParam.png

 

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.  Do anyone know?  Help me Obi Wan Kenobi!!  You're my only hope (of closing this task)!

0 Likes
Accepted solutions (2)
810 Views
3 Replies
Replies (3)
Message 2 of 4

BardiaJahan
Advocate
Advocate
Accepted solution

Is 'Valve Status' a string type parameter? Is it a Builtin Parameter or you have defined it.

If you have made it, I believe you can use this in the formula:   = if (Valve Shut, "MEP - ClosedValceHalo", "MEP - OpenValveHalo")

Otherwise, through API, you can use either BuiltinParameters (if it is a one of them) or LookupParameter("Valve Status") and set it accordingly.

Message 3 of 4

Anonymous
Not applicable

I have Valve Status set as a typed parameter, so it's Valve Status<Generic Annotations>.  I try using the IF statement, and it gives me the error: "Inconsistent Units"...  I'm trying multiple approaches to this, because I really need to get it done.  What's worse is that I have to do it to 40 different valves; but figuring out the first one is always the biggest hurdle, right?

0 Likes
Message 4 of 4

matthew_taylor
Advisor
Advisor
Accepted solution

The simplest way to achieve what you're doing, given your example, would be to have both generic annotations in the family, and change the visibility through the 'valve shut' parameter. Have an associated parameter for 'valve open' (could probably be non-shared), and have its formula set to 'NOT(Valve Status)'.

Apply each parameter to its associated generic annotation's 'visible' property.


Cheers,

-Matt
_______________________________________________________________________________
Marking a post as a 'solution' helps the community. Giving a post 'Kudos' is as good as saying thanks. Why not do both?