PDA

View Full Version : How to Calculate field on totals in schedule



twaldock
2007-05-02, 02:18 AM
Does anyone know how I can create a calculated field which works on the total value in a schedule. If I try it I get the calculation working on the individual instance values for each entry, even if I untick the "Itemise every instance".

In this case I have an area field, which reports an area for each Room for all building levels; the schedule has a total value for all rooms on each floor level (grouped by level). I want a conditional calculated field which takes that the total area of all rooms on a particular floor level and compares it to a stated value - it would then flag if it is greater or less than that value.

belinda.66428
2007-05-02, 03:18 AM
I'm not sure you can. If anyone knows I'd be interested too. :lol:

Elmo
2007-05-02, 06:28 AM
Hmm, when I have a chance I'll take a look into it. There might be a way but I'm not putting my hopes up.

Steve_Stafford
2007-05-02, 02:24 PM
What you are asking for is a query of a query and it can't be done in Revit yet. It could be done in a database application like Microsoft Access potentially after exporting the model data. Unfortunately we can't ask questions using the results of another schedule.

It is possible to get some results like this if you store the final number in a schedule key but it requires you to manually update this number to work as well as adding the value to each element that needs it for comparison...room for error likely, unacceptable? Maybe...

I'll track down a link to a thread that discusses this technique when I get back...something about area analysis and there are posts from both me and Scott Brown (sbrown) in it from a few years ago now.

mattb.128764
2009-02-13, 09:25 PM
Is this still true, or is there a way to do this in 09? I need to find a way to use the totals that are generated within the schedule in a calculated value.
Thanks

Scott Womack
2009-02-13, 09:35 PM
Still true in '09, and from what I've seen will still be true in the 2010 version.

No, I'm NOT on the Beta team this go around.

mattb.128764
2009-02-18, 03:41 PM
well - here's my problem: I need to determine the quantity of modeled elements from their length. Traditional math would suggest that you add all the lengths together and divide by the known length that that object is made (for sake of argument we'll say these objects are made in 8' pieces). So I've added a parameter that is Length (actual length of modeled object) as well as Known Manufactured Length (i.e. 8'). I have created a simple formula: Length / Known Manufactured Length. Revit will take the Length of the individual object and divide it by 8', which gives me inaccurate results - especially when I'm dealing with pieces that are 2' long or smaller. How then should I create my object, or create a calculated field in my schedule to receive consistant, accurate info?...

aggockel50321
2009-02-18, 04:37 PM
Try this:

Add the count parameter for your family or family type, and check "calculate totals" for it under the formatting tab.

Check "calculate totals" for the length parameter, and then under the Sort tab, down at the bottom left, un-check the "itemize every instance" checkbox.

You'll then get your family as a single line, showing the total number of items (count) and the total length, which you can then attack with a calculated value.

mattb.128764
2009-02-18, 04:57 PM
I've done all of that - the issue is that Revit will not take the Grand Total length and divide that by anything. Revit takes the individual lengths for the individual instances and applies the formula - then adds them all up. It seems like a minor thing, but it really throws the numbers off when you get into small objects.

aggockel50321
2009-02-18, 05:53 PM
Revit takes the individual lengths for the individual instances and applies the formula - then adds them all up


But if you un-check the "itemize every instance" box, you'll get a total count and a total length for each family or type in the schedule...not the length of each instance....

mattb.128764
2009-02-18, 07:34 PM
I may have left out the crucial bit of information....The main problem that I'm experiencing is trying to simply add (1) 8' piece onto the total quantity. I can get the quantity to generate and come up with accurate numbers until i get to quantities of 1 and 0 (really short pieces that don't break the .5 barrier for an integer). In these instances I want Revit to add 1 (always have 1 extra). So my formula would look like this:
"Quantity": Length / Manufactured Length
Then i would have to create another parameter to accomodate for the 1's and 0's (which is where everything goes wrong). So my formula for that would be:
"Quantity with Extras": Quantity + if(Quantity<1, Quantity +1, Quantity).
This formula is applied to the instances, not the grand total - big difference! Say I have (2) pieces that are 1' long and their manufactured length is 8'. Revit would do this:
1'/8'=0.125 (and since this is less than 1) +1
1'/8'=0.125 +1
Quantity with Extras = 2
NOW, in a hypothetical world, if you were to add the total length (2'), divide by Manufactured Length (8')=0.25. If I had my way, Revit would then use this # and add 1 to it, making my grand total 1.25 (or 1 as an integer).