Results 1 to 3 of 3

Thread: Revit Formula Query

  1. #1
    New Member
    Join Date
    December 22, 2013
    Current Local Time
    02:59 AM

    Not allowed! Not allowed!

    Revit Formula Query


    I am trying to write a formula for Revit that does the following:

    (IF (Parameter 1 is ticked) AND (Parameter 2 is ticked) THEN show text "WORDS" OR IF (Parameter 1 is ticked) AND (Parameter 2 is unticked) THEN from Parameter 3 subtract 300 OR IF (Parameter 1 is unticked) AND (Parameter 2 is ticked) THEN from Parameter 3 subtract 500.

    By ticked or unticked I mean the parameter is a Yes/No Parameter.

    Thanks in advance


  2. #2
    Forum Addict josephpeel's Avatar
    Join Date
    May 3, 2012
    Current Local Time
    08:59 PM

    Not allowed! Not allowed!
    Have a look at this if you want to combine different boolean functions;
    AB327-4 Fuzzy Math Essentials for Revit Family Builders - Documents

    Its also available on AUGI.

    However, my personal opinion is that it is better to avoid setting multiple parameters in different configurations by using formulas, that is what Types are for.

  3. #3
    Moderator snowyweston's Avatar
    Join Date
    December 21, 2010
    Current Local Time
    06:59 PM

    Not allowed! Not allowed!
    First off, you're confusing inputs and outputs - both in terms of parameter value types and with respect to formula construction.

    As in? You've a text value return in the first part:


    but then switch to a number/length/integer (?) value in the subsequent parts (where you start talking about subtractions)

    So you need to break things down to build this all up...

    Firstly, establish what P3 is doing (value wise) - and you will need a product/result parameter for that (unless P3 itself is a product, in which case you could use the definition here in it's place)


    then think about what the text return values of the above will be, i.e.

    <text parameter> = if(and(P1,not(P2)), "P1 is ticked, P2 is not", if(and(P2,not(P1)),"P2 is ticked, P1 is not",if(and(P1,P2)),"both are ticked","none are ticked"))))))))))

    ^I'm writing this freehand, away from Revit, and with a somewhat glib tint - copy-pasting these "solutions" won't help (they won't work as I've not counted up the closed parenthesis correctly, deliberately) but should give you some food for thought.

Similar Threads

  1. Moderator Query - Dynamo
    By amoursol in forum Dynamo BIM
    Replies: 32
    Last Post: December 12th, 2014, 09:34 PM
  2. Revit Formula Query
    By amoursol in forum Architecture and General Revit Questions
    Replies: 17
    Last Post: November 28th, 2014, 12:58 PM
  3. SQL query for a schedule
    By benaw in forum Third party Add-Ins, API and R&D
    Replies: 1
    Last Post: September 24th, 2012, 02:37 PM
  4. WMI Query help!
    By Gordon Price in forum Third party Add-Ins, API and R&D
    Replies: 0
    Last Post: July 8th, 2012, 01:22 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, 10: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