Results 1 to 7 of 7

Thread: If statement

  1. #1
    Junior Member
    Join Date
    December 15, 2014
    Posts
    36
    Current Local Time
    11:48 AM

    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. #2
    Member DavidLarson's Avatar
    Join Date
    July 10, 2015
    Location
    Boise, Idaho
    Posts
    484
    Current Local Time
    05:48 AM
    https://www.revitforum.org/tutorials...day-usage.html

    I believe what you should be using is NOT instead of IF

  3. #3
    Senior Member Robin Deurloo's Avatar
    Join Date
    July 7, 2011
    Location
    Rotterdam, Holland
    Posts
    815
    Current Local Time
    01:48 PM
    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.

  4. #4
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,262
    Current Local Time
    12:48 PM
    Quote 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 14th, 2018 at 10:56 PM.

  5. #5
    Junior Member
    Join Date
    December 15, 2014
    Posts
    36
    Current Local Time
    11:48 AM
    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 Thumbnails Attached Thumbnails If statement-1.png  
    Last edited by Shan1512; May 17th, 2018 at 06:57 AM.

  6. #6
    Senior Member Robin Deurloo's Avatar
    Join Date
    July 7, 2011
    Location
    Rotterdam, Holland
    Posts
    815
    Current Local Time
    01:48 PM
    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.

  7. #7
    Junior Member
    Join Date
    December 15, 2014
    Posts
    36
    Current Local Time
    11:48 AM

    If statement

    Quote 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.

    Quote 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.

    Quote 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 17th, 2018 at 07:37 AM.

Similar Threads

  1. If Else Statement
    By Mimi Azimar in forum Dynamo BIM
    Replies: 4
    Last Post: May 26th, 2017, 07:57 AM
  2. Help with IF statement?
    By ryntau in forum Dynamo BIM
    Replies: 5
    Last Post: February 22nd, 2017, 09:49 AM
  3. IF Statement Help...
    By dynodan1uk in forum Architecture - Family Creation
    Replies: 11
    Last Post: April 21st, 2015, 09:58 AM
  4. If statement help
    By mkisno4 in forum Architecture - Family Creation
    Replies: 7
    Last Post: April 20th, 2015, 09:35 PM
  5. IF statement help
    By dzatto in forum Architecture - Family Creation
    Replies: 4
    Last Post: August 16th, 2013, 03:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •