View Full Version : Revit 2010 / 2011 - Family - Change Formula by Type
saeborne
2010-05-05, 02:15 PM
Hi all...
So I have a family with a Formula Parameter. For simplicity sake let's say it's
Area / 25
Is it possible to change the Formula by Type?
For example:
Type A, I want Area / 25
Type B, I want Area * 100
Type C, I want (Area / 3) + 2
(never mind that these formulas don't make sense in any practical application. They're just for illustration)
Now, I know I can do this with a nested conditional statement...
IF(Type = A, Area / 25, IF(Type = B, Area * 100, IF(Type = C, Area / 3 +2, 0)))
But... I may have 30 different types. The conditional statement is guaranteed to get very long, and very complex. It would be difficult, if not impossible, to add a new type. Furthermore, Type D might be a conditional in and of itself.
Ideally, I would like a Type_Formula parameter, that is an expression of the desired formula. Then as the type changes, the actual formula changes too.
Does anyone know if this is possible?
Thank you,
josh.made4worship
2010-05-05, 04:16 PM
Hi there, to my knowledge there is no way you can do this other than the way you indicated...depending on your application, you might be able to creatively use nested families to get what you want, but I'm not sure that is any better of a solution or would even work in your situation.
saeborne
2010-05-05, 04:22 PM
nested families.
YES! I think I can make this work.
Thanks for the point in the right direction.
saeborne
2010-05-05, 06:29 PM
Hrm... So I was really excited to try this as a nested family. And it works!... Sort of.
I can pass a number from the host family to the nest family, and then run a calculation in the nested family. So that works great... But...
I can't get the result from the calculation back up to the host family. So I can't schedule the values, and get a grand total.
Then I thought, Aha! Shared Parameters will save the day!
But... I can't access shared parameters in Generic Annotations. And I can't put labels in regular families. So I'm stuck... grrrrr
twiceroadsfool
2010-05-05, 06:47 PM
The host family has to basically be nothing more than a carrier, you have to schedule the nested families, to do what youre trying to do.
saeborne
2010-05-05, 07:02 PM
Right. I can share the nested families. And then schedule each nested family. But I may have 10 or more nested families. I would like to schedule all the nested families together, and come up with a grand total.
And to my knowledge, I can't make a multi-category schedule for note blocks.
twiceroadsfool
2010-05-05, 08:07 PM
For instance.
If i wanted to calculate, say... Occupants per door, based on varying calculations of code, i could have nested families in the "door" with different formulas in the different Code families. The different code families all have an instance parameter for door number, which is Linked to the Door number in the door family. So when i schedule the shared nested Code family, there will be once for each door placed, with the caluclations ive asked it for as shared parameters. its only going to schedule the ones that are in use, selected by the Family Type parameter in the door family. So you alter your "selection" and it uses that one. It doesnt matter how many variations there are.
Our door panels and frames 9and many other peoples) work the same way.
For note blocks.... Im not sure you can do it. How about you tell us what youre trying to actually achieve instead of the hypothetical? Then we wont send you running at the wrong tree. :)
saeborne
2010-05-05, 08:48 PM
Good question, Aaron.
Wasn't trying to be cryptic. Just looking for the individual tools to make this work.
My goal is similar to this thread:
LINK (http://forums.augi.com/showthread.php?p=1065690#post1065690)
In a nutshell, I'm trying to find a clean, simple method of calculating Required Plumbing Fixtures, per IBC. I would like to type in my occupant load, into a Generic Annotation family. Set the Use group as a Type setting. And then have Revit run the calculation for required plumbing fixtures, per IBC.
It's funny Aaron, you and I have discussed calculating plumbing fixtures as area plans:
LINK (http://forums.augi.com/showthread.php?t=58819&highlight=required+plumbing+fixtures)
But I was never able to overcome the issue of having multiple discrete business areas on the same floor. As you know, the formula for Business does not scale in an additive manner.
---
So... I'm happy to share what I've started, in the hopes of further development. Note, it looks like poop right now, and it only has two use groups, and the formulas are not correct per code. I'll fix all that once I get the mechanics worked out.
But there are nested families that have a different formula for each use group.
For the most part, this will work... Except, at the end of the day, I want to be able to add the grand total of all required fixtures, across all Use Groups. This last step is where I'm getting stuck.
I can't make a Type setting change the formula. (as far as I know), which is why it's nested.
I can't have the nested family push data back to the Host family.
I can't run a schedule of each unique nested family.
Anyway, I would really appreciate your help.
Cheers,
Bryan
twiceroadsfool
2010-05-06, 12:49 AM
I can't run a schedule of each unique nested family.
Cheers,
Bryan
Why not? My Door Panels and Door Frames are all Shared and Nested, and i can schedule every one of them. Maybe use an actual Family instead of the Generic Annotations, and i think itll cure up the entire problem.
If i wasnt so slammed on a deadline right now, id try to whip it up. :(
saeborne
2010-05-06, 01:34 AM
Right... I can schedule a nested, shared, generic annotation. But specifically, here's where I'm running into trouble.
1 Host family, has 10 different nested families, (actual different families, not types of the same family. They are different families so each can have a unique formula to calculate the OCC_LOAD.)
I'm having trouble scheduling each of the 10 different nested families, in the same schedule, to get a grand total.
If you can figure it out, you will be my personal hero, and I'll make a little shrine in my apartment in your honor. It will have candles and little velvet curtains. It will be sa-wheeet!
twiceroadsfool
2010-05-06, 03:19 AM
I know, but i think youre going about it the wrong way.
First, stop with the Annotations alltogether. Just use a Generic Model Family. Call it "Thing Placer."
Then make ten nested Generic Models (Or data devices, or nurse call devices, whatever), with the different formulas. Call them "Actual Things (1-10)"
In "Thing Placer" make a Family Type Parameter, to SELECT between Actual Things 1-10, depending on occupancy. Theyll have different formulas for Shared parameter "WHATEVER."
Youll place TEN "Thing Placer" in the project, and use the FT selector (instance, btw) to select the different "Actual Things." Then youll schedule the ACTUAL THINGS, and tell WHATEVER (in the schedule) to Calculate totals.
Yesyes?
saeborne
2010-05-06, 01:02 PM
I get what you're saying, Aaron.
I was using generic annotations, so I could have easy access to labels. Also, I like the idea of storing these elements in a drafting view. But with generic annotation, I don't have access to shared parameters. So now I can't calculate totals.
If I use generic models, I do get access to shared parameters... But now I would need other nested annotation families to make the parameters easy to see and edit.
And then the question is, where do I put the "Thing Placers?" As generic models, they have to live somewhere in the model, right? Hide them in a design option?
twiceroadsfool
2010-05-06, 01:07 PM
They have to live somewhere, but who says theyre is any geometry in them? And you dont need easy visual access to them, since there is a schedule. You can set up the schedule in your template and switch the FT parameter there.
BUT, i use the Previous Annotation Phase for things like this. So you could place whatever you like, and have it not be an issue. :)
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.