Donate Now Goal amount for this year: 2500 USD, Received: 1627 USD (65%)

Results 1 to 7 of 7
Like Tree8Likes
  • 5 Post By cellersick
  • 1 Post By montanaboy27
  • 1 Post By Necro99
  • 1 Post By Necro99

Thread: Roundup Function

  1. #1
    New Member
    Join Date
    November 26, 2014
    Posts
    2
    Current Local Time
    10:55 AM

    Roundup Function

    Hey all!

    I'm in need of a little help trying to get my "Start Reaction - Total" & "End Reaction - Total" on my beams to round up to the nearest 5k. I've searched around and I've seen in general how to use the roundup function, but can't seem to apply it to my label correctly! Any help would be greatly appreciated. To recap, I need my end reaction totals to always round up to the nearest 5k-10k.

    Thanks in advance!!

    MT

  2. #2
    Moderator cellophane's Avatar
    Join Date
    August 9, 2011
    Location
    Louisville, KY
    Posts
    6,143
    Current Local Time
    01:55 PM
    I'm guessing you've seen this post: https://www.revitforum.org/tutorials...day-usage.html ?

  3. #3
    Member
    Join Date
    March 21, 2013
    Location
    Phoenix, AZ
    Posts
    275
    Current Local Time
    10:55 AM
    Depends on what isn't working. If it's an "inconsistent units" error, remember that the rounding functions expect unitless numbers, so you need to make them unitless for the rounding function and then re-unit them afterwards: rounddown((3'-5"/1") /(4"/1"))*1" -> gives you 10".

    To use the rounding functions to round to an arbitrary increment, you need to perform your rounding operation after dividing by that increment. For example, to round x=157,386k up to the closest 5k (ignoring units): roundup(x/5)*5. (157,386/5=31,477.2, rounded up to 31,478, then multiplied by 5 to get 157,390)

    This is handy for all sorts of modularizing needs.

  4. #4
    New Member
    Join Date
    November 26, 2014
    Posts
    2
    Current Local Time
    10:55 AM
    That did it!!!! Thanks Chris!!! The key was to divide it by the rounding increment and then multiply it back in at the end! WORKS GLORIOUSLY!!!! My Boss thanks you too!
    LeanneZ likes this.

  5. #5
    Member
    Join Date
    February 22, 2013
    Posts
    333
    Current Local Time
    01:55 PM
    Quote Originally Posted by cellersick View Post
    To use the rounding functions to round to an arbitrary increment, you need to perform your rounding operation after dividing by that increment. For example, to round x=157,386k up to the closest 5k (ignoring units): roundup(x/5)*5. (157,386/5=31,477.2, rounded up to 31,478, then multiplied by 5 to get 157,390)

    This is handy for all sorts of modularizing needs.
    I was going to suggest this same thing. I use it on my Electric Heating Coil and VAV families to pick the heater kW by 0.5 kW increments.
    tzframpton likes this.

  6. #6
    Forum Addict tzframpton's Avatar
    Join Date
    January 17, 2011
    Location
    Dallas, TX
    Posts
    2,029
    Current Local Time
    12:55 PM
    Quote Originally Posted by Necro99 View Post
    I was going to suggest this same thing. I use it on my Electric Heating Coil and VAV families to pick the heater kW by 0.5 kW increments.
    Would love to see an example.

    -TZ

  7. #7
    Member
    Join Date
    February 22, 2013
    Posts
    333
    Current Local Time
    01:55 PM
    Quote Originally Posted by tzframpton View Post
    Would love to see an example.

    -TZ
    Sure! We size our heating coils to meet the largest of two heating loads: 1) the MBH required to lift the air to 85°F, or 2) the MBH required to offset the calculated heating load of the Space. (This is because often the heating load alone will dictate a coil Leaving Air Temperature of < 80°, which will feel cold to occupants. ASHRAE recommends staying above 85°F for this reason.)

    So my kW formula then take the largest value (Thermal Comfort Heating Load or Heating Load_Total) and divides it by 3.413 to get kW. Then I do the roundup-multiply-divide trick to get it to consistently output values in 0.5 increments.


    (roundup(2 * if(Heating Coil KW Override = 0, if(Thermal Comfort Heating Load > Heating Load_Total, (Thermal Comfort Heating Load / 3.413), (Heating Load_Total / 3.413)), Heating Coil KW Override))) / 2

    The "override" value allows me to override the formula and use whatever kW I want. Very helpful for existing equipment! I use something similar for all of my calculated parameters.
    Last edited by Necro99; January 25th, 2017 at 07:09 PM.
    tzframpton likes this.

Similar Threads

  1. issue with repeater function
    By kunster in forum Architecture - Conceptual Massing and Adaptive Components
    Replies: 1
    Last Post: November 10th, 2016, 07:45 AM
  2. Schedule roundup issue regarding "itemize every instance"...
    By lost again again in forum Architecture and General Revit Questions
    Replies: 7
    Last Post: February 29th, 2016, 01:20 PM
  3. Erreur fonction roundup
    By Picasso06 in forum Forum Français
    Replies: 0
    Last Post: February 13th, 2016, 04:18 AM
  4. reporting parameters that function?
    By billiam in forum Architecture and General Revit Questions
    Replies: 2
    Last Post: December 22nd, 2014, 07:03 PM
  5. Archive Function?
    By Jock in forum Architecture and General Revit Questions
    Replies: 1
    Last Post: December 5th, 2013, 03:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •