No announcement yet.

Constraining the Input Value of a Parameter

  • Filter
  • Time
  • Show
Clear All
new posts

    Constraining the Input Value of a Parameter

    Hi All,

    Sorry if this is an elementary question but I can't for the life of me figure this out!
    In the attached image I have displayed my formulas which are controlling the form of an arc upon which other geometry is hosted.

    The trigonometric functions controlling the arc 'break' when the "Rise" is greater than half of the "Span", thus breaking the family.

    What I am trying to do is implement the following formula for the value of my parameter "Rise":

    Rise = if (Rise > Span/2, Span/2, Rise)

    To circumnavigate the error message "there is a circular chain of references among the formulas" which is generated by using the parameter you wish to define in the formula I created the parameters "Rise_Constraint" and "Rise_Max Value".

    Next I created a formula to define "Rise Constraint" : if(Rise > Rise_MaxValue, Rise_MaxValue, Rise).

    I then substituted any instance of the "Rise" parameter in the formulas grouped under the Constraints category, so that these formulas would be driven by "Rise_Constraint" and not "Rise".

    With this constraint in place the geometry no longer breaks when a user inputs a value greater than "Span/2" or "Rise_MaxValue" for the value of "Rise", as the parameter driving the geometry is now "Rise_Constraint" which is constrained to a maximum value of Span / 2.

    The only issue is, as you will see in the attached image, a user can input a value greater than Span / 2 for the value of the "Rise" and it will display as such.

    For example, in the attached image:

    Span = 3000
    Rise_Max Value = Span / 2 = 1500
    Yet the input value for the "Rise" parameter is still showing as 1800 which seems counter-intuitive.

    Is there any way to modify this family so that if a value greater than "Rise_MaxValue" is input for "Rise", the value shown (currently 1800) will revert back to "Rise_MaxValue" (currently 1500).

    I know this is a minor issue as the family works perfectly fine, but I would just like it to be as user friendly for whomever is using it, and currently I think it may be a little confusing.

    Attached Files

    Quite a lot of formulas and parameters here... May I ask what precisely you want to achieve? Which parameters you want users to have control over?


      No, there is not a way to do that (in native Revit, probably could wing something with plugins/dynamo) What you can do is strategically locate parameters next to each other, and name them in such a way to clarify the input.

      Rise_Actual=[grayed out, number actually controlling the formula]


      User_Rise=[yes/no or text, grayed out] Yes/NO based on input above

      You could also add tool-tips.
      Julie Kidder
      Architect + BIM Director
      Hartman + Majewski Design Group


      Related Topics