Thanks a bunch for those. It will be a big help.
Thanks a bunch for those. It will be a big help.
There is little to add to this comprehensive list. However, I would like to add this:
Range of Values
Given the following parameters:
user_value:
min_value:
max_value:
actual_value:
Specify a range of valid entries, with the min_value and max_value parameters; then, use the actual value if it is within the range; otherwise, use your minimum or maximum values.
An example of this was applied in my solution for the last month´s thread about the corner piece challenge. See illustration.Code:actual_value = if (user_value < min_value, min_value, if (user_value > max_value, max_value, user_value))
Great post Munk!
One more comment on the if-statements when using combined with a yes/no-parameter:
When using an if-statement for a yes/no-parameter the syntax is different.
For instance:
Door_width = 900 (length parameter)
Building_Code OK (yes/no-parameter): Door_width>850
There's no need to add the <if true>, <if false> part. It will actually give you an error.
Also:
When using formulas, revit is aware of the Units. So when you want this:
Length1 = Length2*Length3 and they are all Length parameters, it will give you an error. Why? Because m x m = m2, which makes it an area parameter.
You'll get the errror "incosistent units". The formula should be: (Length1*Length2)/1 to work.
Additionaly:
The division of 2 lengths will return and interger or number. Handy for array constraints or use in trigonometry calcs.
Currently, <= and >= are not implemented. To express such a comparison, you can use a logical NOT. For example, a<=b can be entered as NOT(a>b)
What if I need this statement, but with another parameter in front of it? For example:
Lift Height (NOT<1'). It gives me errors saying the left paranthesis is unexpected. If I take out the parenthesis, I get errors saying Lift Height NOT is not a valid parameter.
I guess in the case of the lift it is better to use a range of minimum and maximum values. See reply # 12.
Dan, I´m assuming that "Lift Height" is a length parameter, and you don´t want that to be less than 1'
If that´s the case, you should have a look at Alfredo´s post above (#12)
Well sort of. That formula may still work, but let me explain what I'm trying to do.
The lift has ramps attached to it. When it is down, they are flat. When it is up the ends of them fall down with gravity so they are now angled. I used a Yes / no formula to control the visibility of which ramp configuration I need. The problem is that it's set to change at 1', and it does, but if the height is exactly 1' neither of them show! I really need a <= formula but I read in Munk's post that it's not possible.
So, is this the correct formula?
Can you post the family...? not sure that I understand...![]()
Ahh... think I know what you´re wanting to do... the NOT(a>b) doesn´t work with Yes/No (visibility) parameters, instead you can use a NOT as shown in the attached
But... now that you figured the trig, maybe you should just add a Angle parameter to the Ramp, so it slides over the floor at an angle when the lift is raised from the floor ?![]()