Announcement

Collapse
No announcement yet.

Conditional Statement question

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

    Conditional Statement question

    Can you use the value of a family type parameter within another parameter? I've been working on a formula for controlling the visibility of a detail component which I want visible at all times except when the family type parameter is set to a specific type. Thus far I keep on getting an "improper use of boolean expressions" error and I'm not sure if that's due to my formula being wrong or if its not possible. If the latter, has anyone got any workarounds for such a situation?

    #2
    Family types (the value) can't be evaluated in formulas. However, family types parameters can. Check this out and let me know if you need more help.
    Owen Drafting Technologies
    Kyle Owen - Owner

    Comment


      #3
      Hi Kyle, yes I recall your response to my thread the other day and this query is related to that original thread (which is now working fine). Looking at your example, you have multiple yes/no params that control a family type parameter which each have a fixed value whereas in my situation the family type parameter controls multiple types. If I was to revert to displaying multiple yes/no instance parameters for user interaction I could achieve the visibility control of the detail component however the downside is that I no longer have a neat single pulldown for choosing the family type and have to resort to my original method of 2no. yes/no parameters for each family type (1 for the user interaction, the other contains Not(or formula's to evaluate the check box choice(s) to maintain only 1 visible family at a time - a real pain to set that up again.
      Last edited by BLothian; May 14, 2014, 10:11 PM. Reason: fixing shocking english...

      Comment


        #4
        Could you post your family for me to take a look at?
        Owen Drafting Technologies
        Kyle Owen - Owner

        Comment


          #5
          I believe you can use conditional statement on nested family (type), as long as you set the nested family and assign a "label", you can control it via conditional statement.

          See this link as a example (there is an image that pretty much explain the concept)

          Phil-osophy in BIM: Randomize Color and Material in Revit
          Philip Chan
          Practice Technology Manager | HKS
          http://phil-osophyinbim.blogspot.com/

          Comment


            #6
            Originally posted by Parametric Snowman View Post
            I believe you can use conditional statement on nested family (type), as long as you set the nested family and assign a "label", you can control it via conditional statement.

            See this link as a example (there is an image that pretty much explain the concept)

            Phil-osophy in BIM: Randomize Color and Material in Revit
            This is similar to what I mentioned above. Technically speaking, you can't use a family type in a formula, but you can use a family type parameter (which value is a family type).

            Anyway, your blog post reminds that material parameters or their values can't be used in formulas, nor can a formula be applied to a material parameter (like I'll never want to change the door frame material when changing the door panel, for example ). Your work-around of different colored family types is quite clever.

            Also, that randomizer is pretty cool. I just wish I had a use for it.
            Owen Drafting Technologies
            Kyle Owen - Owner

            Comment


              #7
              Originally posted by kowen1208 View Post
              ...Anyway, your blog post reminds that material parameters or their values can't be used in formulas, nor can a formula be applied to a material parameter (like I'll never want to change the door frame material when changing the door panel, for example )...
              That is possible, indirectly, applying this rule: If this length or integer is this, this family type choice is that. It has been explained in this forum in other threads.
              Freelance BIM Provider at Autodesk Services Marketplace | Linkedin

              Comment


                #8
                Originally posted by Alfredo Medina View Post
                That is possible, indirectly, applying this rule: If this length or integer is this, this family type choice is that. It has been explained in this forum in other threads.
                Thanks for chiming in, Alfredo!
                Philip Chan
                Practice Technology Manager | HKS
                http://phil-osophyinbim.blogspot.com/

                Comment


                  #9
                  Thanks for the help guys, much appreciated. I've finally got it working as I want. Parametric Snowman's method didn't quite work for me as the Integer and formula didn't work as expected. This is what I have working:

                  Click image for larger version

Name:	TB_Parameters.PNG
Views:	1
Size:	170.2 KB
ID:	383226

                  I need to organise the parameters to my liking however as I don't want all the yes/no parameters(graphics section) and additional Family Type parameters (Data section) visible on the properties browser. I had intended to make them shared parameters instead which I would set to hidden however it seems in a title block family I can't use shared parameters. Am I stuck with moving them into another section at the bottom of the properties browser or do I have an alternatives?

                  Thanks

                  Comment


                    #10
                    Originally posted by BLothian View Post
                    Parametric Snowman's method didn't quite work for me as the Integer and formula didn't work as expected.
                    Maybe your case is different, not the same example that Phillip describes on his blog.

                    ...it seems in a title block family I can't use shared parameters.
                    Yes, you can.

                    Another comment based on the image that you attached of the Family Types dialog box: the formula for your "Warning Param Check", which is a yes/no parameter, does not need to have an IF statement, and therefore you don't need to put at the end "2 > 1, 1 > 2" to produce a true or false result.
                    Freelance BIM Provider at Autodesk Services Marketplace | Linkedin

                    Comment

                    Related Topics

                    Collapse

                    Working...
                    X