Announcement

Collapse
No announcement yet.

Schedule formula (is there a formula expert in the house?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Schedule formula (is there a formula expert in the house?)

    Hey guys,

    I'm trying to modify an occupancy load checker that backchecks the number in the room tag. As it stands, there's a formula parameter called Check Occupancy that reads "abs(Occupant Load Number - OCCUPANT LOAD)" Where the Occ Load Number is calculated based on the area of the room and the OCC LOAD is the number input by the designer. In the schedule I filter the "Check Occupancy" parameter to display if the difference is greater than a certain number, but that gives me a value whether the Occ Load Number is greater than or less than the Occ Load input by the designer.

    Is there a way to tell the parameter to show ONLY if the Occ Load # is greater than the Occ Load? Something akin to "abs(Occupant Load Number > OCCUPANT LOAD)"? -- that doesn't work, btw but that's what I'm trying to accomplish.

    Does that make sense? It's tough for me to explain it since I didn't initially create this formula.

    Confusedly yours,
    John

    #2
    Originally posted by John McCamont View Post
    ...Is there a way to tell the parameter to show ONLY if the Occ Load # is greater than the Occ Load? Something akin to "abs(Occupant Load Number > OCCUPANT LOAD)"? -- that doesn't work, btw but that's what I'm trying to accomplish...
    No, because the "<result-if-false>" in the IF formula cannot be blank.
    At least you could make it zero, like this:
    if( Occupant Load Number > OCCUPANT LOAD, abs(Occupant Load Number - OCCUPANT LOAD), 0)
    Freelance BIM Provider at Autodesk Services Marketplace | Linkedin

    Comment


      #3
      Originally posted by Alfredo Medina View Post
      No, because the "<result-if-false>" in the IF formula cannot be blank.
      At least you could make it zero, like this:
      if(Occupant Load Number > OCCUPANT LOAD, abs(Occupant Load Number - OCCUPANT LOAD), 0)
      Ahh ... that's closer! Now it shows any that are greater than as 0, which I can just filter to, that's good I just realized another problem tho, ... if the room gets smaller, and the OCCUPANT LOAD becomes too big, I can't filter this parameter with "equals 0" and I'm back to the same problem as before. Guess you can't take the human out of it after all. Sheesh I've been working with Intel for too long lol. I'd like a 2-column checker that shows "if less than" and "if greater" if that's possible. Too bad filters only give you an "AND" option.

      Thanks Alfredo

      btw, how did that formula give anything greater than as 0? Not really understanding it...

      Comment


        #4
        Let me see if I understand this correctly:

        1. Occ load number > Occ load => show in schedule
        2. Occ load number < Occ load => show in schedule???
        3. Occ load number is not the same as Occ load => show in schedule
        4. Occ load number is (for instance) more then 2 off Occ load => show in schedule

        See attached for options 1 to 4... You should use Yes/No parameters here and filter on those.

        btw:
        abs(Occupant Load Number > OCCUPANT LOAD) is not a valid formula. There's no need for the ABS-function. That's why it's not working
        Attached Files
        Martijn de Riet
        Professional Revit Consultant | Revit API Developer
        MdR Advies
        Planta1 Revit Online Consulting

        Comment


          #5
          Originally posted by mdradvies View Post
          Let me see if I understand this correctly:

          1. Occ load number > Occ load => show in schedule
          2. Occ load number < Occ load => show in schedule???
          3. Occ load number is not the same as Occ load => show in schedule
          4. Occ load number is (for instance) more then 2 off Occ load => show in schedule

          See attached for options 1 to 4... You should use Yes/No parameters here and filter on those.
          That's basically what I ended up doing. I took Alfredo's formula and copy/reversed it and made two schedules. I was hoping for one schedule with 2 columns so I could do it in one glance, but Revit doesn't seem to like that.

          btw:
          abs(Occupant Load Number > OCCUPANT LOAD) is not a valid formula. There's no need for the ABS-function. That's why it's not working
          Ya, I found that out the hard way. the abs formula was already set up with a - instead of a >, so I just thought I'd give it a shot. I have no idea what abs means anyway except with cars :crazy:

          Thanks guys. You've been a lot of help!

          Comment


            #6
            Originally posted by John McCamont View Post
            ...Ya, I found that out the hard way. the abs formula was already set up with a - instead of a >, so I just thought I'd give it a shot. I have no idea what abs means anyway except with cars :crazy:
            Example:

            Occupant Load Number = 5
            Occupant Load = 10

            (Occupant Load Number - Occupant Load) = -5
            abs(Occupant Load Number - Occupant Load) = 5

            abs gives you the absolute value, without sign.
            Freelance BIM Provider at Autodesk Services Marketplace | Linkedin

            Comment


              #7
              Originally posted by John McCamont View Post
              That's basically what I ended up doing. I took Alfredo's formula and copy/reversed it and made two schedules. I was hoping for one schedule with 2 columns so I could do it in one glance, but Revit doesn't seem to like that.

              Ya, I found that out the hard way. the abs formula was already set up with a - instead of a >, so I just thought I'd give it a shot. I have no idea what abs means anyway except with cars :crazy:

              Thanks guys. You've been a lot of help!
              I'm still confused. Do you want it in one SCHEDULE, or one COLUMN??? It is in one schedule in my attachment.. If you want it in one column, only one formula remains: Occ load number = not(Occ load)... This covers all three other options.
              Last edited by mdradvies; September 9, 2011, 08:47 PM.
              Martijn de Riet
              Professional Revit Consultant | Revit API Developer
              MdR Advies
              Planta1 Revit Online Consulting

              Comment


                #8
                Originally posted by mdradvies View Post
                I'm still confused. Do you want it in one SCHEDULE, or one COLUMN??? It is in one schedule in my attachment.. If you want it in one column, only one formula remains: Occ load number = not(Occ load)... This covers all three other options.
                I understood that the the idea was not to display a Yes or No, but to show a numeric value instead: the result of Occupancy load number minus Occupant load, but only if the former was greater than the latter; otherwise, nothing, but a blank numeric value is not possible, hence the suggestion about showing a zero.
                Freelance BIM Provider at Autodesk Services Marketplace | Linkedin

                Comment


                  #9
                  Ahh...
                  I was thinking he wanted only to show the rooms which were meeting that condition... Or perhaps sort on those options...
                  Well, in that case, you're right.
                  Martijn de Riet
                  Professional Revit Consultant | Revit API Developer
                  MdR Advies
                  Planta1 Revit Online Consulting

                  Comment

                  Related Topics

                  Collapse

                  Working...
                  X