I have a bracket for a speaker that has 3 different pin positions for its tilt. For each pin position, the bracket has a maximum and minimum tilt threshold. For pin position 2 and 3, the formula works fine. For pin position 1, if i type an angle that goes beyond its limit, initially, it looks like Revit has recognised the formula. However, when apply is clicked, it doesn't recognise it and it applies the angle that it can't do. I have checked the formula and it appears to be exactly how it needs to be. Can anyone help? Or is this Revit just being unhelpful.
Solved! Go to Solution.
Solved by ToanDN. Go to Solution.
If it is 3 fixed pin positions only, isn't it easier and more user friendly to have 3x Yes/No parameters say 15/30/45?
If angle input is a must...simplify it by using max tilt angle as only ondition (if A>45, 45, A)
YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION
I'm not sure how the Yes/No parameter would work with a minimum and a maximum tilt requirement. What you have provided for the alternative formula is a part of what I have already done. Which works for 2 options, but not one of them, which seems a fault to me
When you said 3 pin positions I assumed 3 fixed position ... meaning if the 3 positions are 15 30 and 45... it cannot happen that the angle is 33 degrees.
If it is not the case and the tilt can be anything between 0 and 45... then all you need is if(Tilt < 0, 0, if(Tilt > 45, 45, Tilt)) any other value would be ignored/invalid... or? what did you have in mind?
YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION
The pin positions of the family determine the length away from the wall. For each length position, the bracket has different max/min tilt functions.
2 and 3 options work fine. Option 1, does not. So I am happy with the formula, because 2 an 3 work. but why doesn't 1 work?
What are the values of Angle and Rotation for position 1 supposed to be??? The way you have it set up now...the values seem to be as per the conditions you set in the formula
if(Pin position length = 68.4 mm, if(Angle > 45°, 135°, if(Angle < -10°, 80°, Angle + 90°)), Angle + 90°)
ie: when PPL is 68.4 Angle is set to 30 degree (condition = 30 + 90 = 120!!!) .... flexing it continues to give correct values ... so I am not sure what is not working
Note FYI : the positions are types...but the Angle and Rotation u are using are instance. usually the parameters controlling th types are type parameters...
YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION
Position 1 is max of 15 and min of -45.
Correct, the positions are types, however each bracket used in a project will have a different tilt requirement depending on its location in the room, hence why they are instance parameters.
ummm im not getting it...the formula is working fine for position 1. See screenshot in previous reply
YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION
The angle that you have input as 30 goes beyond the 15degree allowance for that position.
when a formula is used like this, it will always show the angle that you request, however, the actual angle should be restricted. In this instance, the FIX angle should stop at 105 degrees, not got to 120
It is 2 conditions which need to be met...
look at your screenshot...the Pin Position Length is 68.4mm (ie: Pos 3) => the following portion of the formula applies...for position 68.4mm you do not have that restriction
If you set the Pin Position Length to 48.3 (ie: Pos 1) then the first condition will take effect
Formula seems to be working fine as per the set conditions for all 3 positions...You need to go through the type and check both conditions Angel and Position Length...if that is not the value for angle which you need for position 1 then you need to change the position (@68.4mm) of the formula shown above.. adding more conditions something like
YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION
The pin positions are types and I don't want or need to adjust those. The issue is the tilt angles on position 1 ONLY. The formula works on the other 2 options for the min/max tilt. Position 1 TILT is where the issue is
Again....for position 68.4mm you do not have that restriction read previous reply for alternative condition/formula
if(Pin position length = 48.3 mm, if(Angle > 15°, 105°, if(Angle < -45°, 45°, Angle + 90°)), if(Pin position length = 58.2 mm, if(Angle > 30°, 120°, if(Angle < -25°, 65°, Angle + 90°)), if(Pin position length = 68.4 mm, if(or(Angle = 45°, and(Angle > 15°, Angle < 45°)), 105°, if(Angle > 45°, 135°, if(Angle < -10°, 80°, Angle + 90°))), Angle + 90°)))
Snapshot from previous reply:
YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION
...
YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION
I'm sorry, as ever, this sort of problem solving can be tricky to follow.
are you telling me that this formula won't work for what I want, but on only position 1?
if(Pin position length = 48.3 mm, if(Angle > 15°, 105°, if(Angle < -45°, 45°, Angle + 90°)),
if(Pin position length = 58.2 mm, if(Angle > 30°, 120°, if(Angle < -25°, 65°, Angle + 90°)),
if(Pin position length = 68.4 mm, if(Angle > 45°, 135°, if(Angle < -10°, 80°, Angle + 90°)), Angle + 90°)))
Could you highlight what is wrong with it, other than the position itself, which I cannot change
Reference to your statement above, I am saying that the 105 degrees restriction for angles greater than 15 and less than 45 is not set in your formula for position 1. It is too many nested ifs and conditions!!!... and I am not exactly sure what the expected output should be. You need to look at the portion of the formula related to PIN Position Length 68.4 and fix those conditions.
YOUTUBE | BIM | COMPUTATIONAL DESIGN | PARAMETRIC DESIGN | GENERATIVE DESIGN | VISUAL PROGRAMMING
If you find this reply helpful kindly hit the LIKE BUTTON and if applicable please ACCEPT AS SOLUTION
You seem confused as what position1 is. In the picture (message 9) which is the a picture representing the failure (?) the value for [Pin position length ] is 68.4mm, and not 48.3mm !!! Your formula works fine. I would introduce some extra parameters to make the system more readable.
I disagree I'm afraid. It seems the formula layout is confusing people. The pin position 1 is 68.4. This is the third part of the formula. The first part which keeps being referred to is Pin position 3. There are 3 types of this family for all 3 pin positions. I have to have the pin position as an instance parameter as the actual angle is variable and that is the only thing I can reference to a type for each pin position.
Can't find what you're looking for? Ask the community or share your knowledge.