Announcement

Collapse
No announcement yet.

If statement

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

    If statement

    Hi,

    Currently preparing a family and I couldn’t workout the if statement for this particular case that I am looking.

    The family has 5 types. I am trying to write a If statement that could negate all the four types if one of them is true. In other words family has Type 1,2,3,4,5 (5 types) which flexes on the length and other attributes.However the annotation for each type changes in either length or width.

    Any help is greatly appreciated.Thanks for your time in advance.


    Sent from my iPhone using Tapatalk

    #2


    I believe what you should be using is NOT instead of IF
    ​My ID was stolen. Now I'm only called Dav

    Comment


      #3
      So, you are trying to choose family type with an IF statement in a parameter?
      If not then I am afraid I don't understand what you are trying to do.
      Company Website: www.deurloobm.nl
      Revit Ideas: Is this family Mirrored? | Approve warnings | Family Type parameter just those in the family

      Comment


        #4
        Originally posted by Shan1512 View Post
        the annotation for each type changes in either length or width.
        Presuming I'm understanding you correctly...

        Let's say:
        Type 1: Length=1000 & Width=50
        Type 2: Length=2000 & Width=100

        the formula for the (text) parameter you are attempting to define will follow the pattern:

        Where Length & Width values correspond to Type 1:

        <Text Parameter to be defined> (where result = "Type 1")
        = if(and(Length=1000,Width=50),"Type 1",if(and(Length=2000,Width=100),"Type 2,"NA")))

        ...and so forth.

        However the complexity of such a text-return formula (for such purposes) gets ugly quickly, especially if your "other attributes" also need factoring, and the number limits are not so clear.

        You will note you can not, as of yet, as you can with &TEXT in Excel, pull non-text (parameter) values into text fields (i.e. your <Length> or <Width> values)

        Arguably, you would be better served with an actual family-swap parameter and "simply" report that value, or a nested-tied value from such a child.



        Pictures, or better yet, an .rfa, would help clarify your quandry no end.
        Last edited by snowyweston; May 14, 2018, 10:56 PM.

        Comment


          #5
          Sorry Folks couldn't get earlier than this. Thanks DavidLarson , I have already bookmarked this thread and currently banging my head (believe me for good only ) to implement them wherever possible so that I can get more flexibility.I have to do one more family which has formula mentioned here this weekend which is one of the complicated ones (i guess).


          Well coming to the current one, this is how my current family graphics looks like. What I am planning to do is:



          I have currently 5 type graphics associated into the family for 5 types . When I change the family type then the corresponding graphics should show which I am currently working to achieve with If statement . Hope I get this right thins time.
          statement.


          Cheers.
          Attached Files
          Last edited by Shan1512; May 17, 2018, 06:57 AM.

          Comment


            #6
            Still not a 100% sure what you are trying to do, but I'm guessing you have a Family Type parameter in your family to choose one of the 5 nested family in your family for each type?

            I don't think it is possible to populate a parameter according to the name of the Family Type with a formula.
            I don't think you can even use the Type name in a formula.
            You would have to go over all 5 Types and choose the nested Family you want for that Type.
            Company Website: www.deurloobm.nl
            Revit Ideas: Is this family Mirrored? | Approve warnings | Family Type parameter just those in the family

            Comment


              #7
              If statement

              Originally posted by Robin Deurloo View Post
              Still not a 100% sure what you are trying to do, but I'm guessing you have a Family Type parameter in your family to choose one of the 5 nested family in your family for each type?
              Yes that’s correct I created a family with 5 types with different dimensions and I do have 5 annotations of different sizes. What I am trying to achieve is if I change the type of the family the if statement should change the annotation size.

              Originally posted by Robin Deurloo View Post
              I don't think it is possible to populate a parameter according to the name of the Family Type with a formula.
              It makes sense to me if we write the condition based on their dimensions hopefully it would work as it is the driving factor here.

              Originally posted by Robin Deurloo View Post
              You would have to go over all 5 Types and choose the nested Family you want for that Type.
              I did this previously and it was working good.
              Will post back how did I go with the clue.


              Sent from my iPhone using Tapatalk
              Last edited by Shan1512; May 17, 2018, 07:37 AM.

              Comment

              Related Topics

              Collapse

              Working...
              X