PDA

View Full Version : Formulas in generic annotations?



patricks
2008-01-25, 03:14 PM
I have a life-safety symbol that I place on my life safety plans showing the room occupancy type, square footage, s.f. per person, and number of occupants in the room.

The s.f. per person is a type parameter for the annotation, and I know I have to manually enter the area of the room, but I tried to make the number of persons calculate based on the S.F. instance parameter divided by the S.F. per person type parameter.

The family was originally created with all numerical parameters as Integer fields. When I added a formula to the number of persons field, it took the formula okay, but when I hit OK in the Family Types box I got an error saying "Can't find solution for formulas for Type 'Keynote',"

I tried changing all the fields to regular number fields (had to delete and re-create each parameter and re-assign the labels), but still I get the same error. Are formulas just not possible in annotation families?

iru69
2008-01-26, 03:39 AM
I'm afraid you've run into a bug.

However, if you play around with it enough, you can coax it into letting you do a formula (start with some empty parameters, press okay, re-edit the parameters, change one, press okay, repeat until you're done).

You also have to be careful about how you mix instance and type parameters when using formulas.

In your example, you want the floor area to be an instance parameter and you probably want the Occupancy Load Factor to be a type parameter (though it could also be an instance parameter if you wanted) and you want the Room Occupancy to be an instance parameter.

You can use integers or numbers, it doesn't matter. If you use numbers, you can always format the label parameter to round off if you want to.

I've attached a working example (I think) of what you're after.


Are formulas just not possible in annotation families?

mthurnauer
2008-02-11, 06:44 PM
I have also started to mess around with this issue and I have managed to work it out reasonably well, but wanted to take the occupancy calculation to the next level. I have made a parameter for the Area_Per_Occupant which shows up under my Room properties or in Room Area Schedule. The Occupant load automatically divides the room area by the Area_Per_Occupant, but now I want to add the ability to have some areas that are an actual occupant count rather than area/area_per_occupant. I figured this would need to have two more variables: One would be Net (Yes/No) and AOC (Actual Occupant Count). The Occupant load would then be: If Net=yes then Area/Area_Per_Occupant else AOC. Is this how I write the If>Then>Else statement? I have not been able to make it work.

patricks
2008-02-11, 08:03 PM
I believe when you do an IF statement in Revit, the THEN and ELSE operators are understood, and separated only by commas in the parenthetical expression that follows the IF operator.

You can look in the Help file to make sure, but it's something like "IF a (x, y)" means "If 'a' is true, then 'x', else 'y'."

NKramer
2008-02-11, 09:16 PM
Yes/ no formulas are a pain. That siad I think it would be something like this.

If(Net,Area/Area_Per_Occupant,AOC)

With yes/ no parameters the if and result is implied. If you want to drive a yes/ no parameter with a formula it just reads "width>2" Meaning that if Width is greater than 2 it will turn on, if not off. If you want to use a yes/ no parameter in a formula you just put the parameter name in the formula (see above).

That said we are using a combination of schedules and tags to do our area/ exiting calcs. You can create a schedule key with your load factors, put those in a schedule, and then use calculated values to determine your loading. After that you have the calculated value next to your tagged value in a check schedule and have to manually copy from one field to another. Its a bit of work to set up but then you can copy the schedules from one job to another and you have most of your exiting analysis done on the fly, see attached. This is a template in progress so it may look a little messy.

Nick

PS I still haven't figured out how to post thumbnails. Anybody know and want to share? :)

andrew.brister
2008-10-22, 06:22 PM
I'm afraid you've run into a bug.

However, if you play around with it enough, you can coax it into letting you do a formula (start with some empty parameters, press okay, re-edit the parameters, change one, press okay, repeat until you're done).



What do you mean, start with empty parameters?