IF/THEN Formula and "Yes/No" Parameter

clippincott-CL
Advocate

IF/THEN Formula and "Yes/No" Parameter

clippincott-CL
Advocate
Advocate
I have created two "Yes/No" parameters in a family and associated each of them with the visibility of a different symbol in the family. If one of these parameters is set to "Yes", I want the other set to automatically be set to "No", and vice/versa.

I was trying to achieve this by making a formula that basically says, IF X=Yes THEN Y=No but I don't know how to reference the values of "Yes" or "No" in my formula, Revit tells me that "Yes" and "No" are not valid family parameters. I also tried "True" and "False" but got the same result.

Any ideas as to how I can do this? Any suggestions will be appreciated.
0 Likes
Reply
Accepted solutions (3)
294,788 Views
57 Replies
Replies (57)

Martin__Schmid
Autodesk
Autodesk
Accepted solution
Not sure I completely understand what you're trying to do... however, take a look at the attached family.

I have three solids that look like a 1, a 2, and a 3, the visibility for each is defined by params V1, V2, and V3.

V2=V1
V3=not(V1)

Thus, if 1 is visible, 2 is also visible, but 3 is not.
If 1 is NOT visible, 2 is also not visible, but 3 is visible.


Martin Schmid
Product Line Manager
Mechanical Detailing and Electrical Design
Architecture, Engineering, and Construction
Autodesk, Inc.

clippincott-CL
Advocate
Advocate
Great, that is exactly what I was looking for, thanks Martin. I just didn't know the correct syntax to create a formula saying I wanted one parameter to be the opposite of the other parameter. The "not(V1)" part is what I was missing.

Thanks again.

Anonymous
Not applicable

Hello,

 

I've tried to play with the formulas but I am not having too much

sucess here. With this example how can I make it work wherein...

if I select "1", "2" & "'3" will hide,

if I seelct "2", "1" & "3" will hide,

if I select "3", "2" & "3" will hide.

 

Thanks..

 

 

 

Anonymous
Not applicable

Have a look at the example conditional statement family in the bimshare box about 1/2 way down this page. It should help you with the syntax.

http://rugwell.wordpress.com/

Note - dont go to the bimshare page link at the top, thats something totally different.

Anonymous
Not applicable

Try this

 

Visibility Red      not(Visibility Green)      wihich ever one is on the other is off

Visibility Green

 

CharlesBerteaux
Advisor
Advisor

So, I have 4 Parameters as shown in the image. For the life of me I can not get the if 01 is selected then so is 02 but not 03 and 04. and like wise when 03 is selected then so is 04, but not 01 and 02........Please Help.....

 

I know im close, I can smell it......undefined

Charles Berteaux Iv
EDT BIM/VDC/Technology Department Manager | SSOE Group | Hillsboro
www.ssoe.com

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.


EESignature

Alfredo_Medina
Mentor
Mentor

Try this: "See item" is an integer. When its value is 1, you see Item 1 only. When it is 2, you see item 2, only, etc.

If its value is less than 1 or greater than 4, none of the elements is visible.

 

undefined


Alfredo Medina _________________________________________________________________ ______
Licensed Architect (Florida) | Freelance Instructor | Profile on Linkedin

Anonymous
Not applicable

Maybe someone can help me with my problem that is similar. I am trying to make a yes/no parameter true and run a formula when another yes/no parameter is ture. What I have as a formula is

 

Ex, Apple=IF (Orange,and(or (blue, red), yellow) )

 

Orange is the yes/no

blue, red, and yellow also yes/no

 

I would like it to be if Orange is yes, then Apple is yes and = to blue, red or yellow

 

Any advice

Thanks

0 Likes

CoreyDaun
Mentor
Mentor

jmiller-CDES wrote:

"...

I would like it to be if Orange is yes, then Apple is yes and = to blue, red or yellow

 ..."


I don't understand exactly what you mean in your statement in blue above. Can you elaborate a little bit? If Orange is yes, then how is the value of Apple futher determined by the status of the "Blue", "Red", and "Yellow" Parameters? Is "Apple" also a Yes/No Parameter?

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

Thomas
Contributor
Contributor

I've used things like:

 

IF(Orange,IF(Blue,(IF(Red,(IF(Yellow,AllFalse,YellowTrue),RedTrue),BlueTrue),OrangeTrue)

 

It can get pretty hard to read when you get alot of conditions though.

 

0 Likes

Anonymous
Not applicable

hi  Alfredo

 

I tried doing that but I get a message that says "Inconsistent Units". do you know why revit comes up with this message?

I am using Revit 2015.

Thanks for your help!


@Alfredo_Medina wrote:

Try this: "See item" is an integer. When its value is 1, you see Item 1 only. When it is 2, you see item 2, only, etc.

If its value is less than 1 or greater than 4, none of the elements is visible.

 

undefined


 

0 Likes

Anonymous
Not applicable

How would this work in the case where you have filled regions representing key plan sectors that you would want to: Be driven by the visibility of the key plan, but still have independant control of visibility of the sector?

 

Items:

1) Key Plan

2) Sector A

3) Sector B

4) Sector C

5) Sector D

 

Desire: Key plan visibility controls whether all sectors will be visible, but each sector's visibility can be controlled individually.

 

Do you have to create containers for each sectors visibility in order to reference in a formula related to each in order to avoid circle references? This is still confusing to me.

 

0 Likes

Thomas
Contributor
Contributor

To have such controls on a Key Plan you will need to make the plan itself a family, with each sector as a part with the visibility links.  

 

When I do Key Plans I make a wide scale floor plan view and just put Filled regions on it.  If I'm making multiple I'll have a master view and then Dependant views for each type.  Dependant Views link scale, details (lines/etc), and view settings, and you can use Hide / Element to hide specific regions.  

 

If you are working with an imported CAD file you can also just use a Drafting View, but you won't be able to make Dependants.  If you need the same Key Plan on multiple sheets you can make it a Legend View, or just Duplicate with Details the views onces you have one made.  You can then name the views 1,2,3 or something, and the Title on Sheet all the same.

 

If you really want to make it a family I would try a Detail Item or Generic Annotation.  You can link Visbility of different lines and regions the same as extrusions in other families.  I've done this for things like an Exit Sign symbol where you want different arrows, all in the same symbol.

 

0 Likes

Anonymous
Not applicable

That's what I've done...I'm trying to work out this formula in a generic annotation family. I gave up on it and just made an instance parameter for each. They just don't affect eachother, so I'll just have to check my plans manually. Waa waa. Smiley Indifferent

0 Likes

tomclements
Explorer
Explorer

Use "not"

setting each widget parameter to yes/ no for visibility in the formula for one of the widgets ... not([widget2])

 

0 Likes

Anonymous
Not applicable

Hi Alfredo,

 

It so happens that I have four visibility options and was so glad to see your post. However, I would like to take it a little further. Each of my four options have varying part numbers and as an option is selected, the corresponding part number should display in a schedule. Is this possible?

 

Thanks in advance.

 

Cheers,

 

Andre

 

0 Likes

L.Maas
Mentor
Mentor

I would probably approach it differently. As you mention different part number then you talking about different objects. 

I would then use shared nested families and give them a visibility parameter. When they are visible they will be included in the schedule and when they are hidden they will not be included

Louis

EESignature

Please mention Revit version, especially when uploading Revit files.

Thomas
Contributor
Contributor

If I recall correctly, Revit won't accapt text in formulas.  Like in excel you could just say ..="text", but it won't work in Revit.

 

If you're using different part numbers the best way would be to use different Types in the family.  Keep your visibility checkboxes and just set them based on what should be on in each Type.  You can also set different dimensions, description, etc for each Type.

 

I would use Instance visibilities if the item is the same part, model # and all, but can be configured differently.  For example Exit Signs.  You can buy them with universal punch out arrows.  So I would use a single Familiy & Type for it and use visibilites to indicate arrow directions. 

Anonymous
Not applicable

Thank you, Louis. Thank you, Thomas. Thanks guys for the replies.

 

I am attaching a Project file and the Family file. You will notice that I have 5 families all in all. All of them are nested as suggested since they have different identification numbers. The 4 arms are my options and the box is not an option and will always have to stay.

 

I tried to load them into a Project as attached. The options work well. I am happy with them (unless a better suggestion of handling them is presented, I can switch to that). My problem is the display of their identification numbers in a Schedule. The nested families' identification numbers do not carrry through. Well, actually to be honest, I do not know how to display the text parameter of nested families. Can you guide me please? Thanks very much.

 

Andre

 

 

Type a product name