Archive for the ‘Schedules & Formulas’ Category

h1

BIMproductivity.com

July 14, 2011

I’ve been playing with a small side project this year and have yet to formally introduce it until now. It’s a website I set up to offer Revit families, schedules, and methodology for boosting productivity while designing and documenting our built environment.

In striving for quality over quantity BIM Productivity has a small offering of families and schedules that provide near instant and accurate results for doing the necessary yet mundane tasks of code analysis or engineering directly within Revit.

One such family helps calculate the required plumbing fixtures per the 2006 version of the International Building Code (IBC) and the International Plumbing Code (IPC) (read a full description here).   It is super quick and easy to use for demonstration of building code compliance and studies but I don’t want you to take my word for it. I would like you to try a free sample.  The sample family will calculate required fixtures for Business, Mercantile, and Storage occupancies and may be used on your commercial projects free of charge.  If you like what you see, or need additional occupancies, or other production enhancing families please visit BIMproductivity.com.

– Jake

 

 

h1

Schedules: Tricks with text.

July 12, 2011

A question on the AUGI forums came up about the ability to add or combine strings of text together in a schedule. http://forums.augi.com/showthread.php?t=131429

While that function would be great you can not directly combine strings of text in a schedule.

You can however do some mathematical formulas and “toggle” on or off preset strings of text. Take a look and try for yourself. If nothing else it could make for a nifty party trick.

For the trick you will need:

An integer parameter.
A calculated value – that is set to: Text, and a formula.

Set your formula to something like:
if(integer = 1, “Show text string 1”, if(integer = 2, “Show text string 2”, “ERROR”))

Tip: you can keep nesting IF statements if you need more than two strings of text.

Refer to the attached image for how this works.

-Jake

h1

Yes / No graphic presentations in Schedules

May 5, 2011

Working with yes no parameters in schedules make sense. We set them up, check the little boxes, slap the schedule on the sheet and all of a sudden we are shocked because the little radio boxes change from a checked box or unchecked box to text stating “Yes”, “No”, or a blank box.

To architects and engineers this may seem weird because historically we made matrix schedules and would identify a option with a filled circle, dot, “X” or other graphic. A “Yes” doesn’t work for us.

One method to resolve this problem is as follows:

Create your yes no parameters as normal.

Create a Calculated parameter called something like “Graphic”. Make it a Text parameter and set the formula to:

“*”

* Insert your graphic symbol between the quote marks. One way to do this is to copy and paste a symbol from the Windows Character Map.

Create new Calculated parameters for each of your Yes/No parameters. Set the formulas as:

if((nameofYESNOparam), Graphic, ” “)

Duplicate the schedule so you have a working schedule and a schedule to be placed on your sheet.

For the schedule you will place on the sheet make sure to hide the Yes/No parameters (under the formatting tab) and rename the headers as you would like them to be displayed on the sheet. Work from the working schedule and let the other schedule display the same information but in a more desirable format.

Your finished result should look something like this:

Enjoy.

-Jake

h1

Structuring a Conditional Statement

March 27, 2011

Problem:
I need a label in my family that will monitor a numerical input and change its value as a specific number value limit of another label is reached.

Example:
Wire gauge values in a panel schedule change as the wattage goes up.  This would be one example where the numerical input (watts) is being monitored by the wire gauge (label) and will change at specific thresholds.

Solution:
The label requires a conditional statement that checks each wire gauge threshold and when a specific value is reached renders the appropriate wire gauge.

Targets:
NEC Table 310-16 sets the following AWG (wire gauge) values for 75 degree (F) temperature rated copper conductors

14 AWG = 15 amps
12 AWG=  20 amps
10 AWG= 30 amps

Formulas:
Watts / 120v = Amps

Variables:
CL1 = Circuit Load 1 (represents that manually input Volt*Amps VA or Watts for Circuit 1)

Label Value:
Wire 1 (represents the wire gauge value in the panel)

Conditional Structure for Wire 1 Label
    is assigned in the Type dialog of the family as follows:

if(CL1 = 0, 0, 
__This first logical check says if the value for the label CL1 = 0 then return 0 which is
__assigned to the label  Wire 1.  The comma after the last 0 is where you put in the
__results if the value is not 0 which is your  next conditional check.  In my working
__version I used the 0 value to drive a visibility control of a text  based label which
__had the value of “—“ since I did not want to see a 0 value for the wire gauge.

if(CL1 / 120 < 15, 14, 
__ The next logical check says convert CL1 to amps by CL1 / 120 (as per our
__formula) and if it is less than 15 set the value for CL1 to 14 for 14 gauge wire. 
__This conditional follows the previous giving us a  structure of
__if(CL1 = 0, 0, if(CL1 / 120 < 15, 14, 
__the trailing comma is looking for the results if the value is 15 or larger and is
__where we place the next logical check

if(CL1 / 120 < 20, 12, 
__ The next logical check is similar to the previous only this condition checks
__for amp values from 15 to  just below 20 and assigns the value of 12 to the label
__Wire1 giving us a structure of 
__if(CL1 = 0, 0, if(CL1 / 120 < 15, 14, if(CL1 / 120 < 20, 12,
__ Again we have a trailing comma so we  need another logical check or
__closing value.

if(CL1 / 120 < 30, 10,
__The next logical check is again similar to the previous but checks for the
__amp values from 20 to just below 30 and assigns the value of 14 to the label
__Wire1 giving us a structure of 
__ if(CL1 = 0, 0, if(CL1 / 120 < 15, 14, if(CL1 / 120 < 20, 12, if(CL9 / 120 < 30, 10,

At this point we need to address what the value will be if we exceed the 30 amp limit.  In reality this conditional statement has numerous more checks for 50, 65, 85, … 200 amp conditions but I’ve shortened this example.  In my working version of this I had the statement return a value of 100 if I exceeded the wire size limit of the largest breaker that would typically be put in an electrical panel.  I used the 100 as a trigger for the visibility of a warning label that resided right on top of the location where the wire gauge was on my panel schedule so it was obvious that a value was entered that would not be accepted by the panel. The final statement reads as follows:

if(CL1 = 0, 0, if(CL1 / 120 < 15, 14, if(CL1 / 120 < 20, 12, if(CL9 / 120 < 30, 10,100))))

Note that you need 4 )))) to close the statement, if you count the corresponding ( brackets you will also find 4 so you will need to balance the brackets to close the statement otherwise Revit will return a Boolean error warning. 

This is an example of a nested conditional statement.  The working version was more complex in that the Wire1 label had to check two different CL1 values.  One where the values were as input and another where the values were bumped up by 25% for continuous loading as is the case with commercial lighting circuits.

When you start to build this type of intelligence into your Revit families you will begin to see how long and complex the conditional statements can become but this kind of automation is very valuable for improved accuracy and quality control.  Also when you create these kind of families I highly recommend running a performance check on every formula driven label to assure it’s working properly.  Given the time it takes to create one of these gems you will begin to see why the B.I.M. operators that build these high performance components have issues with sharing their B.I.M. files or turning the B.I.M. over to the Owner.  Personally I strip these components from my B.I.M. model before I share it with anyone.  One word of warning.  Nested Conditional Statements rigorously test your ability to handle logic and will drive you crazy.
.
.

.

.

.

.

Seeing my Psychiatrist Tomorrow.
Carl

h1

Want to schedule a Family by Room in Revit?

March 14, 2011

As I understand it, the ability to schedule a family by room is limited. Furniture, plumbing fixtures, lights and specialty equipment are some of the categories that are room aware. 

To get the room parameter into your schedule you will need to go to the Fields tab of your Schedule Properties and in the lower left corner the “Select available fields from” drop down has the “Room” field.

So once you add the appropriate “Room: Name” parameter to our schedule you may notice some objects don’t schedule properly.  Typically it’s due to the fact that the family is not residing inside the room boundary.  Intuitively you think the room boundary is everything within the surface envelope of the space.  Unfortunately Revit isn’t intuitive so its boundaries are different.

In particular some floor based families present a challenge.  Here’s a excerpt from a recent post I made to AUGI addressing a Plumbing Fixture Schedule that sorts by Room location.

The particular plumbing fixture families that are presenting a problem are floor based. When I check the room boundary settings in the project (mouse over room name>tab once>select X-box) the properties dialog indicates the Base Offset = 0’-0” it’s not until I push the Base Offset down below -1’-0” to -1’-1” that the floor based families properly see the room they are in and schedule properly.

In doing this I discovered that the base offset has to be equal to or less than the floor thickness minus 1’-0” so a 4” concrete slab has to have the Base Offset of the Room boundary set to -1’-4” or less (since we are into negatives that might be -1’-5”).

So the resulting question is where is the 1’-0” coming from? Upon investigating the families the default floor thickness in the floor based family is 1’-0”. So you would think changing this value to something less than 1’-0” would change the resulting value in the project. It doesn’t.

This offset is unique to each Room Boundary so you have to do a select all (Select room boundary>type SA) and change them simultaneously.

Area & Volume Computations (under the Home Tab>Room & Area drop down) doesn’t appear to give you global control of this value.

This also raises the question of the Base Offset value affecting room volume computations.

The only reason I can see for having a Base Offset for defining a room would be if you had a step down area of a room like a sunken living area or bathing area, which points out Revit’s shortcomings in computing this boundary buy giving only a planar offset.

Regardless you need to be spatially aware of the structural thickness of your room when using the Room Name parameter in your schedules, specifically the floor.

Roomless in Revit!!
Carl

Conversations with Jake: A follow up on this post.

I had a toilet family I down loaded from TOTO that was being identified by the room parameter in my schedule so I sent it to Jake for comment.  Here’s his response:

“Your toilet family is a face based family and is not hosting to a floor, but any face. This is most likely why it is functioning better than your floor hosted families. Another advantage of the FB families is that they will not be deleted if the host is deleted. To create one you can start with the generic model face based template. You can then change it to any family category desired. Disadvantage as you noted as you could end up with a toilet on the ceiling or a wall.  Might make for a great art installation.”

Thanks Jake!

That disadvantage Jake is referring to occurs at the initial placement of the object. In the image below you can see how the toilet wants to place it self on the wall. Note the ribbon “Placement” options.  You need to select “Place on Face” or if your work plane is assigned to the floor level the “Place on Work Plane” to get the object to orient correctly.

h1

Working with Formulas in Revit

February 6, 2011

There’s a nice synopsis on Revit formulas and syntax at:
http://revitfamilies.blogspot.com/2005/10/revit-formulae.html

Thanks to Mike Hardy Brown for the post.  Partially duplicated below incase we lose the link.

_______________________

TIP: Keep your units consistent. Do not mix units in your formulas. You can use constants with no units assigned to them.

Length = Height + Width + sqrt(Height*Width)
Length = Wall 1 (11000mm)+ Wall 2 (15000mm)
Area = Length (500mm) * Width (300mm)
Volume = Length (500mm) * Width (300mm) * Height (800 mm)
Width = 100m * cos(angle)
x = 2*abs(a) + abs(b/2)

Create the family geometry.

Create and label dimensions to the geometry. See Labeling Dimensions. Do not select the Instance Parameter option. In the Family Editor, formulas are available for type parameters only.
Click Family Types from the Design Bar.
In the Formula column next to the appropriate parameter, type the formula for the parameter. Notice that the formula begins with an equal sign (=).

Formulas can comprise conditional statements. You enter conditional statements in the Formula box for a numerical parameter.

A conditional statement uses this structure:

IF (, , )

This means that values are entered for the parameter, depending on whether the condition is satisfied (true) or not satisfied (false). If the condition is true, return the true value. If the condition is false, return the false value.

Conditions can use numeric values, numeric parameter names, or Yes/No parameters. You can use the following comparisons in a condition: <, >, =. You can also use Boolean operators with a conditional statement: AND, OR, NOT. Currently, <= and >= are not implemented. To express such a comparison, you can use a logical NOT. For example, a<=b can be entered as NOT(a>b).

The following are some sample formulas that use conditional statements.

Simple IF: =IF (Length < 3000mm, 200mm, 300mm)

IF with logical AND: =IF ( AND (x = 1 , y = 2), 8 , 3 )

IF with logical OR: =IF ( OR ( A = 1 , B = 3 ) , 8 , 3 )

IF with Yes/No condition: =IF (Long, 50, 60) where Long is a Yes/No parameter defined as Long = Length > 40

Embedded IF statements: =IF ( Length < 35′ , 2′ 6″ , IF ( Length < 45′ , 3′ , IF ( Length < 55′ , 5′ , 8′ ) ) )

The following are valid formula abbreviations.

Addition— +
Subtraction— –
Multiplication—*
Division—/
Exponentiation—^: x^y, x raised to the power of y
Logarithm—log
Square root—sqrt: sqrt(16)
Sine—sin
Cosine—cos
Tangent—tan
Arcsine—asin
Arccosine—acos
Arctangent—atan
e raised to an x power—exp
Absolute Value—abs

Driving Revit Functionality
Carl

h1

Why Can’t I Use the “Count” Parameter in my Schedule Formulas?

January 19, 2011

Seems like a logical question.  The parameter is counting the items now I just want to use that value in my formula.  But wait Revit says you can’t!

Here’s a explanation of how to get around this idiosyncrasy.  With a completely counter intuitive process. 

Essentially you need to create a calculated value parameter, called let’s say “Total” that points to a parameter in your schedule that contains the value you want to multiple the count by and once the parameter is created you check the “Calculate Totals” box in the Schedule Properties “Formatting” tab for that “Total” parameter.

If that doesn’t explain it try this Link.

Enjoy
Carl