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

Resolving "Invalid Formula" for Yes/No parameter

12 REPLIES 12
Reply
Message 1 of 13
Anonymous
1771 Views, 12 Replies

Resolving "Invalid Formula" for Yes/No parameter

Hello, I am having issues with the Yes/No formula. I am trying to create multipule formulas for a backsheet and I've had success with two of them, however when I go to the next formula it continues to tell me "Invalid Formula." I am using the "not()" formula. 

 

Thank you.

12 REPLIES 12
Message 2 of 13
CoreyDaun
in reply to: Anonymous

Hello, welcome to the Discussion Groups!

 

We'll need a little more information to be able to help. What version of Revit are you using? Can you post the formula you're working with?

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 13
Anonymous
in reply to: CoreyDaun

I am using revit Architecture 2013 and the formula I am using is the not formula ex. not(1), does that help?
Message 4 of 13
CoreyDaun
in reply to: Anonymous

Within the NOT function, there has to be an expression that returns a TRUE/FALSE result. A few examples:

 

= not(Number = 1)    ---> where "Number" is a Number or an Integer type parameter

 

= not(Length1 > Length2)

 

= not(Checkbox)    ---> where "Checkbox" is a Yes/No type parameter

 

If you still need some help, can you explain what you're trying to accomplish with this formula?

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 13
Anonymous
in reply to: CoreyDaun

What I am attempting to do is a backsheet for the office I work for, and in this backsheet there are yes no boxes. What I am having a hard time with is getting the yes no formula to work correctly. I want the yes box to be active and for the no box to be checked off, and vise verse. When yes is off no is on.
Message 6 of 13
CoreyDaun
in reply to: Anonymous

That's most easily done when there are only two Yes/No parameters involved. One of the Parameters will be user-controlled and the other will be dependent on the first. Example:

 

Parameter1 & Parameter2 are both Yes/No type parameters.

 

Parameter1 will not have a formula assigned to it. This will be the controlling parameter.

 

Parameter2 will have the formula: "not(Parameter1)"

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 7 of 13
Anonymous
in reply to: CoreyDaun

This formula is only being accepted by one parameter and is working perfectly. However when I use this formula for the next parameter it's telling me "Invalid Formula." How I have it is:

Zoning (YES) is controlling Zoning (NO) with the formula not(Zoning (YES)), that the only parameter that is accepting the formula when I go to the next set of parameters that need the formula it will not accept it.
Message 8 of 13
Anonymous
in reply to: Anonymous

I can attach the file that I am working on for better clarification.
Message 9 of 13
CoreyDaun
in reply to: Anonymous

The problems here lies with the parentheses is the Parameter Name. If they've got a formulaic symbol in their name (i.e. minus, parentheses, asterisk) then it will be treated as such by Revit. So, for example, say you have:

 

Parameter Name 1 = Total_Length

Parameter Name 2 = Option - Type A

Parameter Name 3 = Length (Total)

 

...and you wanted to add these values together with a formula: Total_Length + Option - Type A + Length (Total)

 

Because of the "-" in the Parameter name, Revit thinks that "Option" and "Type A" are two separate parameter names.

Total_Length [plus] Option [minus] Type A      ...returning an error.

 

Because of the "()" in the Parameter name, Revit thinks that "Length" is a function and that "Total" is a separate parameter name.

Option - Type A [plus] Length(Total)      ...returning an error since "Length" isn't a valid function.

 


In lieu of a hyphen, I  instead use the "En Dash" character for Parameter Names. Alt+0150 = "–"

 

If you need to keep the parentheses in the Parameter Names, then you can use the "ornate parentheses" found in the Character Map for the Arial Font.

 

CharMapParenth.JPG

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 10 of 13
Anonymous
in reply to: CoreyDaun

I just happened to figure it out. For some reason revit would not accept the formulas being inputted from top to bottom. When I started to insert the formulas from bottom to top revit accepted them in. Very strange to say the least and I hope this is fixed in, or made better in 2014, but thank you nonetheless for the help.
Message 11 of 13
Anonymous
in reply to: Anonymous

One other question I have is, is there a reason as to why when your inserting parameters in a family that revit orders them in reverse order?
EX:
When I enter parameters in as 1,2,3,4,5,6
Revit then lists them in order of 6,5,4,3,2,1. Is there a way to fix this and reorder the parameters in the Properties box?
Message 12 of 13
CoreyDaun
in reply to: Anonymous

Honestly, I've no idea why Revit prefers reverse-alphabetical order, but I believe that's been an outstanding issue since day one. Furthermore, the sort order is based upon the Parameter name when it is first created, so renaming them does not change the sort order. There is a semi-convoluted method of controlling the sort order of these parameter; you can find it by searching this forum using the term "Parameter Order".

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 13 of 13
Anonymous
in reply to: CoreyDaun

Awesome! Thank you for your help!

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