Constrain movement between two values

Constrain movement between two values

shelmsGYSXD
Advocate Advocate
1,016 Views
6 Replies
Message 1 of 7

Constrain movement between two values

shelmsGYSXD
Advocate
Advocate

I have a family I've created where I need the screw to be adjustable. It needs to move up and down. But only between 0'-0" and 1'-8". I want to make it so if a user tried to go outside these ranges Revit ignores it or gives an error message. Right now I am able to adjust the family but I can input whatever value I want, which I don't want to be able to do. I am new to making families that are adjustable and don't completely understand formulas yet. Can someone help?

0 Likes
Accepted solutions (2)
1,017 Views
6 Replies
Replies (6)
Message 2 of 7

barthbradley
Consultant
Consultant
Accepted solution

Post your family and I'll show you how to do this.  

 

Readme11.pngReadme12.png

0 Likes
Message 3 of 7

shelmsGYSXD
Advocate
Advocate

Here is the file

0 Likes
Message 4 of 7

mhiserZFHXS
Advisor
Advisor
Accepted solution

You need two parameters. One is the input for the user, and the other is the one that actually controls the geometry.

 

The one that controls the geometry needs to have an equation that says

 

if(input_parameter < 0, 0, if(input_parameter > 1'8, 1'8, input_parameter))

Message 5 of 7

barthbradley
Consultant
Consultant

Does the screenshots I added above help you get to where you want to go?  

 

Here's a good resource about formulas  to read:

 

https://www.revitforum.org/node/1126

Message 6 of 7

shelmsGYSXD
Advocate
Advocate

Yes, thank you!

Message 7 of 7

shelmsGYSXD
Advocate
Advocate

Thank you!

0 Likes