Announcement

Collapse
No announcement yet.

Formula editing

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

    Formula editing

    I have a nested component that I am trying to modify in this way:

    If the LPD Option is checked, then all sizes for parameters L and M are stepped down by 1. I tried to edit the formula by adding a "and(..." but I cannot get the syntax correct. I wonder if I need to use "if(and(..." when checking each size or if I can do it globally. Thanks in advance.
    Attached Files

    http://www.captiveaire.com/
    Commercial Kitchen Ventilation Systems

    #2
    Randy - Have you seen this thread? : http://www.revitforum.org/tutorials-...day-usage.html

    If that doesn't solve it, then please provide a screen shot including all the relevant parameters (I´m not sure what the i.e. "1_L" parameters is... a fixed length?)
    Klaus Munkholm
    "Do. Or do not. There is no try."

    Comment


      #3
      I have seen your very helpful thread before Klaus, in fact it is plastered all over my cube walls, but I still have trouble with formulas. Sorry I did not provide enough info and you are correct that parameters such as 1_L are a fixed length. I will post more relevant info tomorrow.

      On the ride home from work I realized that I keep trying to use a if/and condition when i probably should just use a if/if condition here. In simple terms:
      IF LPD Option is on, check for size and assign value. IF not, check for size and assign value.

      I am sure there are multiple ways to get the desired result and it's very possible I am just over-thinking it.

      http://www.captiveaire.com/
      Commercial Kitchen Ventilation Systems

      Comment


        #4
        Randy, your initial thought of using IF(AND is pretty good - The if/and formula would look something like this:

        if(and(Size = 1, LPD Option), 1_L - 1 mm, 1_L)

        Guess this formula could be nested into itself, but it would get huge, and my head would start hurting
        So instead (Only focusing on the L parameter here), add two more parameters:

        "L Size" = if(Size = 1, 1_L, if(Size = 2, 2_L, if(Size = 3, 3_L, if(Size = 4, 4_L, if(Size = 5, 5_L, if(Size = 6, 6_L, 99999"))))))
        The Size based on the userinput in the Size (integer) parameter

        "L Size Minus" = if(Size = 1, 1_L - 1", if(Size = 2, 2_L - 1", if(Size = 3, 3_L - 1", if(Size = 4, 4_L - 1", if(Size = 5, 5_L - 1", if(Size = 6, 6_L - 1", 99999"))))))
        Same as above, but -1

        Then your "L" formula is really simple: if(LPD Option, L Size Minus, L Size)

        Oh, and add a "Warning", just in case someone enters 0 or 6> in the Size paramter: if(L = 99999", "Size must be between 1-6", "OK")
        Attached Files
        Klaus Munkholm
        "Do. Or do not. There is no try."

        Comment


          #5
          Klaus,

          Thank you for your suggestions, your method produces the desired result in a much more efficient way (my head was hurting, too) than the direction I was going. Rather than make a long-winded nested formula, break it into 2 separate..... brilliant! I also like your warning and will use both methods alot in the future.

          http://www.captiveaire.com/
          Commercial Kitchen Ventilation Systems

          Comment

          Related Topics

          Collapse

          Working...
          X