Donate Now Goal amount for this year: 3000 USD, Received: 1207 USD (40%)

Results 1 to 4 of 4

Thread: Formula issue

  1. #1
    Junior Member
    Join Date
    April 7, 2018
    Posts
    19
    Current Local Time
    04:00 PM

    Formula issue

    I have a family which has a parameter controlling the length but I have another parameter calculating off that as well as 4 other params based on whether they are turned on or off.

    I have the formula working for two items but need to add the other 2.

    Roof Panel Span = Span Calc + if([3rd End Plate On.Off], 180 mm, if([2nd End Plate On.Off], 90 mm, 0 mm))

    What I need to introduce is:

    If 2nd End Plate is on then I need to +45mm
    and
    If 2nd Top Plate is on then I need to +45mm
    and
    If 3rd End Plate is on then I need to +45mm
    and
    If 3rd Top Plate is on then I need to +45mm

    So if all are on, then it will be +180mm
    If one is on, then it will be +45mm
    If two are on, then it will be +90mm
    If three are on the it will be +135mm

    I've tried a few formulas but not abel to nail it.

    Can anyone help?

    Thanks in advance!

  2. #2
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Location
    C.LONDON
    Posts
    4,353
    Current Local Time
    04:00 PM
    Quote Originally Posted by GarethCavill View Post
    Can anyone help?
    First, Are they your parameter names verbatim? 3rd End Plate On.Off

    Second, are the square brackets solely a typo here? You need to be using parenthesis in all places.


    Otherwise there's nothing wrong with your method of nesting ifs... but you might be better of looking at using AND instead, i.e.
    =if(and(EP2,EP3),X,if(and(EP2,EP3,TP2,TP3),Y,Z)
    etc

    (where EP2 = "end plate two", and presuming these are Yes/No parameters.

  3. #3
    Senior Member
    Join Date
    August 19, 2011
    Location
    New Hampshire
    Posts
    503
    Current Local Time
    11:00 AM
    He needs the brackets since he has a special character, . , in the parameter name.

    Lengthy formula would be...
    Roof Panel Span = Span Calc + if([3rd End Plate On.Off], 180 mm, if([2nd End Plate On.Off], 90 mm, 0 mm)) + if([2nd End Plate On.Off], 45mm, 0) + if([3rd End Plate On.Off], 45mm, 0) + if([2nd Top Plate On.Off], 45mm, 0) + if([3rd Top Plate On.Off], 45mm, 0)

  4. #4
    Junior Member
    Join Date
    April 7, 2018
    Posts
    19
    Current Local Time
    04:00 PM
    Hi, not sure on brackets, i need to come back to resolve this, however I have another issue with a family. I'll start a new thread on this one....

Similar Threads

  1. Replies: 2
    Last Post: November 18th, 2016, 02:24 PM
  2. % Formula
    By Vik in forum Architecture and General Revit Questions
    Replies: 6
    Last Post: October 28th, 2014, 12:57 PM
  3. Formula issue
    By KK1975 in forum Architecture and General Revit Questions
    Replies: 9
    Last Post: October 17th, 2014, 06:36 AM
  4. MAX value in formula
    By antonko in forum Structure - Family Creation
    Replies: 3
    Last Post: November 22nd, 2011, 07:01 PM
  5. Schedule formula (is there a formula expert in the house?)
    By John McCamont in forum Architecture and General Revit Questions
    Replies: 8
    Last Post: September 9th, 2011, 09:50 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
  •