See the top rated post in this thread. Click here

Results 1 to 10 of 19

Thread: Formula help please

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    I could stop if I wanted to
    Join Date
    2008-10
    Posts
    279
    Login to Give a bone
    0

    Default Formula help please

    Hi all,

    I'm afraid I don't understand these conditional statements at all - and yes I have read the useless summary in the help file (they need to add a visual real world example, not just a bunch of hypothetical numbers...)

    I would like to make a void height parameter which will always be taller or as tall as 3 solid elements which have variable heights.

    So I want this void to always match the height of whichever solid is tallest at the time.

    In non-mathmatical terms, I need something like:

    Void height = The greatest of either A height, B height or C height

    Help would be great : )

    Cheers

  2. #2
    I could stop if I wanted to
    Join Date
    2008-10
    Posts
    279
    Login to Give a bone
    0

    Default Re: Formula help please

    Could an IF statement work?

    Void Height = IF(A>B or C, A, B or C) (B>A or C, B, A or C) (C>A or B, C, A or B) ???

    I guess you can't have 'or' in a formula?

    My brain hurts...

  3. #3
    AUGI Addict
    Join Date
    2015-11
    Location
    Madison, WI
    Posts
    1,318
    Login to Give a bone
    0

    Lightbulb Re: Formula help please

    You're formula doesn't make a lot of sense to me, because I don't know which one to pick, B or C. Revit my also be thinking (Which one do you want, 'B' or 'C'). You might try something similar to 'If(A>(B or C), A, B)'.

    Hope this helps,

    Jeff S.

  4. #4
    All AUGI, all the time
    Join Date
    2006-09
    Location
    The Kingdom of Denmark
    Posts
    560
    Login to Give a bone
    0

    Default Re: Formula help please

    Jeff.

    I´m to tired to figure out how to do this in one line of formula, but it´s fairly easy, when using an extra calculation parameter

    Calc 1 = if(Solid A > Solid B, Solid A, Solid B)

    then

    Void Height = if(Calc 1 > Solid C, Calc 1, Solid C)

    Well, just look at the attached, and see for yourself
    Last edited by Munkholm; 2011-01-10 at 12:17 PM.

  5. #5
    All AUGI, all the time
    Join Date
    2006-08
    Posts
    636
    Login to Give a bone
    0

    Default Re: Formula help please

    try that, not tested, 0.0 value is just a junk number (can be any number) because it will never be a case.
    H = if(or(A > B, A > C), A, if(or(B > A, B > C), B, if(or(C > A, C > B), C, 0.0)))

  6. #6
    All AUGI, all the time
    Join Date
    2006-08
    Posts
    636
    Login to Give a bone
    0

    Default Re: Formula help please

    logically you also have to think the equal cases, like below:
    H = if(or(A > B, A > C, A = B, A = C), A, if(or(B > A, B > C, B = A, B = C), B, if(or(C > A, C > B, C = A, C = B), C, 0.0)))

Similar Threads

  1. 2013: How to use this Formula,"Formula That Returns Strings"?
    By mike99 in forum Revit Architecture - General
    Replies: 4
    Last Post: 2013-01-09, 06:28 AM
  2. Yes/No Formula
    By lonewolfjustin in forum Revit MEP - Families
    Replies: 1
    Last Post: 2009-06-05, 12:21 AM
  3. Formula Help
    By stelthorst in forum Style Management
    Replies: 6
    Last Post: 2008-03-25, 05:07 PM
  4. Formula Use
    By jkrager in forum Revit Architecture - Tips & Tricks
    Replies: 0
    Last Post: 2006-01-20, 06:57 PM
  5. = a formula
    By GuyR in forum Revit Architecture - General
    Replies: 35
    Last Post: 2005-03-11, 08:24 AM

Posting Permissions

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