Page 2 of 30 FirstFirst 12345612 ... LastLast
Results 11 to 20 of 292
Like Tree95Likes

Thread: Revit Formulas for "everyday" usage

  1. #11
    New Member CJ Follmer's Avatar
    Join Date
    December 10, 2010
    Location
    St. Louis MO
    Posts
    4
    Current Local Time
    07:11 PM
    Thanks a bunch for those. It will be a big help.

  2. #12
    Forum Co-Founder Alfredo Medina's Avatar
    Join Date
    December 7, 2010
    Location
    Orlando, FL, USA | info@planta1.com
    Posts
    2,257
    Current Local Time
    08:11 PM
    There is little to add to this comprehensive list. However, I would like to add this:

    Range of Values

    Given the following parameters:

    user_value:
    min_value:
    max_value:
    actual_value:

    Specify a range of valid entries, with the min_value and max_value parameters; then, use the actual value if it is within the range; otherwise, use your minimum or maximum values.

    Code:
    actual_value = if (user_value < min_value, min_value, if (user_value > max_value, max_value, user_value))
    An example of this was applied in my solution for the last month´s thread about the corner piece challenge. See illustration.
    Attached Thumbnails Attached Thumbnails Revit Formulas for &quot;everyday&quot; usage-value-range.jpg  

  3. #13
    Moderator
    "Mark Twain"
    mdradvies's Avatar
    Join Date
    December 16, 2010
    Location
    Boxtel, Netherlands
    Posts
    4,553
    Current Local Time
    01:11 AM
    Great post Munk!
    One more comment on the if-statements when using combined with a yes/no-parameter:
    When using an if-statement for a yes/no-parameter the syntax is different.

    For instance:

    Door_width = 900 (length parameter)
    Building_Code OK (yes/no-parameter): Door_width>850
    There's no need to add the <if true>, <if false> part. It will actually give you an error.


    Also:
    When using formulas, revit is aware of the Units. So when you want this:

    Length1 = Length2*Length3 and they are all Length parameters, it will give you an error. Why? Because m x m = m2, which makes it an area parameter.
    You'll get the errror "incosistent units". The formula should be: (Length1*Length2)/1 to work.

  4. #14
    Moderator
    "RFO 2012 Spelling Bee Champion"
    Alex Cunningham's Avatar
    Join Date
    December 8, 2010
    Location
    Northern California
    Posts
    3,184
    Current Local Time
    05:11 PM
    Additionaly:
    The division of 2 lengths will return and interger or number. Handy for array constraints or use in trigonometry calcs.

  5. #15
    Moderator
    "OMG I killed Revit"
    dzatto's Avatar
    Join Date
    December 9, 2010
    Location
    Dallas, TX
    Posts
    5,037
    Current Local Time
    07:11 PM
    Currently, <= and >= are not implemented. To express such a comparison, you can use a logical NOT. For example, a<=b can be entered as NOT(a>b)

    What if I need this statement, but with another parameter in front of it? For example:

    Lift Height (NOT<1'). It gives me errors saying the left paranthesis is unexpected. If I take out the parenthesis, I get errors saying Lift Height NOT is not a valid parameter.

  6. #16
    Forum Co-Founder Alfredo Medina's Avatar
    Join Date
    December 7, 2010
    Location
    Orlando, FL, USA | info@planta1.com
    Posts
    2,257
    Current Local Time
    08:11 PM
    I guess in the case of the lift it is better to use a range of minimum and maximum values. See reply # 12.

  7. #17
    Administrator Munkholm's Avatar
    Join Date
    December 7, 2010
    Location
    Kingdom of Denmark
    Posts
    4,046
    Current Local Time
    02:11 AM
    Dan, I´m assuming that "Lift Height" is a length parameter, and you don´t want that to be less than 1'
    If that´s the case, you should have a look at Alfredo´s post above (#12)

  8. #18
    Moderator
    "OMG I killed Revit"
    dzatto's Avatar
    Join Date
    December 9, 2010
    Location
    Dallas, TX
    Posts
    5,037
    Current Local Time
    07:11 PM
    Well sort of. That formula may still work, but let me explain what I'm trying to do.

    The lift has ramps attached to it. When it is down, they are flat. When it is up the ends of them fall down with gravity so they are now angled. I used a Yes / no formula to control the visibility of which ramp configuration I need. The problem is that it's set to change at 1', and it does, but if the height is exactly 1' neither of them show! I really need a <= formula but I read in Munk's post that it's not possible.

    So, is this the correct formula?

  9. #19
    Administrator Munkholm's Avatar
    Join Date
    December 7, 2010
    Location
    Kingdom of Denmark
    Posts
    4,046
    Current Local Time
    02:11 AM
    Can you post the family...? not sure that I understand...

  10. #20
    Administrator Munkholm's Avatar
    Join Date
    December 7, 2010
    Location
    Kingdom of Denmark
    Posts
    4,046
    Current Local Time
    02:11 AM
    Ahh... think I know what you´re wanting to do... the NOT(a>b) doesn´t work with Yes/No (visibility) parameters, instead you can use a NOT as shown in the attached

    But... now that you figured the trig, maybe you should just add a Angle parameter to the Ramp, so it slides over the floor at an angle when the lift is raised from the floor ?
    Attached Thumbnails Attached Thumbnails Revit Formulas for &quot;everyday&quot; usage-ramp_not.jpg  

Page 2 of 30 FirstFirst 12345612 ... LastLast

LinkBacks (?)

  1. February 28th, 2012, 04:07 PM
  2. January 10th, 2012, 02:31 PM
  3. January 2nd, 2012, 07:57 PM
  4. December 2nd, 2011, 12:31 PM
  5. November 4th, 2011, 09:59 AM

Similar Threads

  1. Fórmulas de Revit para el "uso diario"
    By Munkholm in forum Foro Español
    Replies: 8
    Last Post: June 7th, 2011, 12:43 PM
  2. Slab slope discrepancy btw "Slope arrow" and "Define Slope"
    By jh75 in forum Structure - General Questions
    Replies: 3
    Last Post: May 6th, 2011, 09:39 PM
  3. Revit 2011 - "Black rendering" with Non-English Win XP
    By Munkholm in forum Tutorials, Tips & Tricks
    Replies: 0
    Last Post: January 10th, 2011, 09:15 AM
  4. Replies: 2
    Last Post: January 7th, 2011, 07:19 PM
  5. Replies: 2
    Last Post: January 7th, 2011, 07:19 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
  •