Results 1 to 9 of 9

Thread: Rounding to nearest .5 in schedules

  1. #1
    Member
    Join Date
    2009-02
    Posts
    39
    0 Did you find this post helpful? Yes

    Default Rounding to nearest .5 in schedules

    I know you can round to the nearest integer, but can you round to the nearest .5 or something like that?

    I have a GPM section in my schedule that is a calculated value, and it gives me the correct numbers. But usually in our schedules we like to round to the nearest half gpm. Is this possible?

    Example: A calculated gpm that shows up as 0.3, we want to show up as 0.5

    Ive looked around a bit but cant find a good answer.

    Thanks in advance.

  2. #2
    All AUGI, all the time CADastrophe's Avatar
    Join Date
    2012-01
    Location
    Site of the next CADaclysm
    Posts
    649
    0 Did you find this post helpful? Yes

    Default Re: Rounding to nearest .5 in schedules

    A simple formula to use is =round (GPM * 2) / 2

    So if you have a number such as 20.3, it will be doubled to 40.6, rounded to 41, and then halved to 20.5

    Or if you have 16.14, it's doubled to 32.28, rounded to 32, and halved to 16.
    Corey D.Please let the saying "The only stupid question is the one not asked" not be seen as a challenge to defy it.

  3. #3
    Member
    Join Date
    2009-02
    Posts
    39
    0 Did you find this post helpful? Yes

    Default Re: Rounding to nearest .5 in schedules

    Ah thank you, that does work. However, some of my GPM's were rounding down to 0. Any GPM below 0 we want to show up as .5. So I had to add an "if" parameter to make that happen. Also, our GPM formula references other fields (like BTU's for example) that are found with a formula, and when you create a field with a formula, you cannot use that field in another formula, you have to re-type that whole formula from the field you want, into your new formula (confusing?). So, we ended up with a massive formula just so we can have our GPM round to the nearest .5

    Here is the formula we ended up with in case anyone else has the same situation and needs a reference:

    if((((Maximum CFM * Heating Airflow * 1.08 * Delta T air) / (500 * Delta T water) * 2) / 2) < 0.5, 0.5, (round(((Maximum CFM * Heating Airflow * 1.08 * Delta T air) / (500 * Delta T water)) * 2) / 2))
    Last edited by jplatte; 2013-03-16 at 01:03 AM.

  4. #4
    All AUGI, all the time CADastrophe's Avatar
    Join Date
    2012-01
    Location
    Site of the next CADaclysm
    Posts
    649
    0 Did you find this post helpful? Yes

    Default Re: Rounding to nearest .5 in schedules

    There are a host of limitations with Revit's formulaic capabilities that cause the inflation in formula length and complexity. But I would not yet call that formula "massive"; see attached pdf, which would be a tiny fraction of the size had we the capabilitity of CONCATENATE...

    RevitFormula.pdf
    Corey D.Please let the saying "The only stupid question is the one not asked" not be seen as a challenge to defy it.

  5. #5
    I could stop if I wanted to
    Join Date
    2004-06
    Location
    Port Moody, BC
    Posts
    335
    0 Did you find this post helpful? Yes

    Default Re: Rounding to nearest .5 in schedules

    Bravo! that formula is amazing!
    Drew Jarvis
    Applications Specialist - Cansel
    Vancouver. BC

  6. #6
    100 Club
    Join Date
    2011-07
    Posts
    143
    0 Did you find this post helpful? Yes

    Default Re: Rounding to nearest .5 in schedules

    Quote Originally Posted by CADastrophe View Post
    There are a host of limitations with Revit's formulaic capabilities that cause the inflation in formula length and complexity. But I would not yet call that formula "massive"; see attached pdf, which would be a tiny fraction of the size had we the capabilitity of CONCATENATE...

    RevitFormula.pdf
    whoa. Please tell me that's the only fixture you guys ever specify.

  7. #7
    All AUGI, all the time CADastrophe's Avatar
    Join Date
    2012-01
    Location
    Site of the next CADaclysm
    Posts
    649
    0 Did you find this post helpful? Yes

    Default Re: Rounding to nearest .5 in schedules

    Quote Originally Posted by BenSammis View Post
    whoa. Please tell me that's the only fixture you guys ever specify.
    That would make it too easy, wouldn't it? I've only created these monster formulas for our most commonly specified fixtures. It wasn't as terrible of a task as it appears - I've got a solid method to this. A while ago, I did ask one of my co-workers to make a minor modification to the formula. When he opened the Family and saw that, his left eye twitched and he fell over. I think he's still on the ground over there somewhere...
    Corey D.Please let the saying "The only stupid question is the one not asked" not be seen as a challenge to defy it.

  8. #8
    100 Club
    Join Date
    2011-07
    Posts
    143
    0 Did you find this post helpful? Yes

    Default Re: Rounding to nearest .5 in schedules

    Man, if we tried to do that we'd need about 200 of them. And by the time I got all of the formulas entered the model numbers would have changed or been discontinued.

  9. #9
    Member
    Join Date
    2009-02
    Posts
    39
    0 Did you find this post helpful? Yes

    Default Re: Rounding to nearest .5 in schedules

    Wow, bravo. I would hate to miss even one parenthesis in that thing and then have to track down where it belongs.

Similar Threads

  1. Rounding up, down or to nearest... any interval
    By DoTheBIM in forum Revit Architecture - General
    Replies: 11
    Last Post: 2013-03-20, 03:07 PM
  2. Rounding Up in Schedules
    By Hulston1982 in forum Revit Architecture - General
    Replies: 7
    Last Post: 2011-05-23, 04:38 PM
  3. Schedules and rounding
    By Dimitri Harvalias in forum Revit Architecture - General
    Replies: 11
    Last Post: 2008-08-26, 12:56 PM
  4. Rounding to the nearest integer in Tables
    By kkinchen in forum AutoCAD Tables
    Replies: 1
    Last Post: 2007-04-26, 04:23 PM
  5. Rounding up to the nearest 5
    By ReachAndre in forum AutoLISP
    Replies: 7
    Last Post: 2007-01-29, 05:56 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
  •