Results 1 to 3 of 3

Thread: Improved Forumlas (Switch Statement)

  1. #1
    Member
    Join Date
    2013-06
    Posts
    29
    Login to Give a bone
    0

    Default Improved Forumlas (Switch Statement)

    I'm looking for an improvement to the capabilities of formulas --specifically with testing against multiple options. If you wanted to test against 6 possibilities, you'd need something like the following:
    if(y0 > y6,if(y0 > y5,if(y0 > y4,if(y0 > y3,if(y0 > y2, if(y0 > y1, y0, y1),if(y1 > y2, y1, y2)),if(y1 > y3,if(y1 > y2, y1, y2),if(y2 > y3, y2, y3))),if(y1 >y4,if(y1 > y3,if(y1 > y2, y1, y2),if(y2 > y3, y2, y3)),if(y2 > y4,if(y2 > y3,y2, y3),if(y3 > y4, y3, y4)))),if(y1 > y5,if(y1 > y4,if(y1 > y3,if(y1 > y2, y1,y2),if(y2 > y3, y2, y3)),if(y2 > y4,if(y2 > y3, y2, y3),if(y3 > y4, y3,y4))),if(y2 > y5,if(y2 > y4,if(y2 > y3, y2, y3),if(y3 > y4, y3, y4)),if(y3 >y5,if(y3 > y4, y3, y4),if(y4 > y5, y4, y5))))),if(y1 > y6,if(y1 > y5,if(y1 >y4,if(y1 > y3,if(y1 > y2, y1, y2),if(y2 > y3, y2, y3)),if(y2 > y4,if(y2 > y3,y2, y3),if(y3 > y4, y3, y4))),if(y2 > y5,if(y2 > y4,if(y2 > y3, y2, y3),if(y3 > y4, y3, y4)),if(y3 > y5,if(y3 > y4, y3, y4),if(y4 > y5, y4, y5)))),if(y2 >y6,if(y2 > y5,if(y2 > y4,if(y2 > y3, y2, y3),if(y3 > y4, y3, y4)),if(y3 >y5,if(y3 > y4, y3, y4),if(y4 > y5, y4, y5))),if(y3 > y6,if(y3 > y5,if(y3 > y4,y3, y4),if(y4 > y5, y4, y5)),if(y4 > y6,if(y4 > y5, y4, y5),if(y5 > y6, y5,y6))))))

    YUCK!

    The formula I'd like to be able to type instead:

    =switch(a,case(>6,"SIX"),case(>5,"FIVE"),case(>4," FOUR"),case(>3,"THREE"),case(>2,"TWO"),case(>1,"ON E"),case(default,"Less Than One"))

  2. #2
    Member
    Join Date
    2015-02
    Posts
    7
    Login to Give a bone
    0

    Default Re: Improved Forumlas (Switch Statement)

    Good Doni49

    Not only Switch.
    I need formulas for text, Like concatenation, right, left, trim, etc

    A little formula editor. As a Access editor: formulas and variables available.

    Allow us to define formulas. Schedule formating.PNG

    funtion size_lookup() can read text field.

    Alow define global variables from Project parameters or from a total of schedule/quantities. And use in other schedule/quantities of another categorie

    Schedule formating.PNG

    Alow add parameter whit formula in system families

    ...

  3. #3
    Woo! Hoo! my 1st post
    Join Date
    2015-09
    Posts
    1
    Login to Give a bone
    0

    Default Re: Improved Forumlas (Switch Statement)

    1. Be able to Create Drop-down selection list from lookup table (not only by trick of using family types)!
    qeqweqe.png
    2. lookup table for Text (not only for numeric values)!
    3. Simplified multiple condition formula (Like doni49 post)
    4. Atleast add "Concatenate" function (like ivan request)!

Similar Threads

  1. Switch Statement for Formulas
    By Wish List System in forum Revit Architecture - Wish List
    Replies: 0
    Last Post: 2013-10-24, 07:37 PM
  2. If statement
    By IXOYE in forum AutoLISP
    Replies: 2
    Last Post: 2012-05-05, 11:07 AM
  3. If statement help
    By prose in forum AutoLISP
    Replies: 3
    Last Post: 2010-01-06, 05:35 PM
  4. Need help with an If else then Statement
    By prose in forum AutoLISP
    Replies: 2
    Last Post: 2008-11-14, 04:04 PM
  5. Double switch plates and switch/outlet combos
    By christo4robin in forum Revit Architecture - Families
    Replies: 10
    Last Post: 2004-12-04, 04:23 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
  •