Announcement

Collapse
No announcement yet.

Use of formulas in Family tyep creation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Use of formulas in Family tyep creation

    Hi guys

    Hopefully posted in the correct place, can anyone shed some light on creating a specific formula to help choose from a different number of options in a text value.

    Basically, for a schedule to work, i need a shared text parameter to display a certain value (either fitted-POST600 or fitted-POST700 or fitted-POST750 etc etc in a text field).

    I'm looking at some way trying to have this value determined by another parameter (_ports_depth) which is a length parameter. So basically I want to be able to change the depth value to either 600mm, 700mm, 750mm, 800mm or 850mm and have the value output into my _Ports_Item text value.

    I'm positive there is a way of expressing this by way of a formula but as a new user of Revit, I'm unsure of exactly what expressions are to be used.

    I've attached a screen shot of my family type which might clarify what I mean!!

    Cheers!

    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	199.2 KB
ID:	410660

    #2
    I think you will need a series of nested if statements to get the options you're looking for. text parameters can use formulas, the results just need to be in quotes so Revit will see it as text.
    [text parameter] = if(ports_depth=600, "fitted-POST600", if(ports_depth=700, "fitted-POST700", "etc"))

    Comment


      #3
      Try this example using a label.
      Attached Files

      Comment


        #4
        Guys.....Thankyou so much. Works perfectly!

        Comment


          #5
          I noticed after I uploaded the first one that you have _Ports_Depth as an instance parameter. If you need that to stay that way then _Ports_Item will need to also become an instance parameter you need to use this formula instead.

          if(_Ports_Depth < 700, "Fitted-POST600", if(and(_Ports_Depth > 600, _Ports_Depth < 750), "Fitted-POST700", if(and(_Ports_Depth > 700, _Ports_Depth < 800), "Fitted-POST750", if(and(_Ports_Depth > 750, _Ports_Depth < 850), "Fitted-POST800", "Fitted-POST850"))))

          The attached family is again a label using the instance parameter as an alternative option.
          Attached Files

          Comment

          Related Topics

          Collapse

          Working...
          X
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎