This site is not sponsored or endorsed by, or affiliated with, Autodesk, Inc.

Thursday, May 24, 2012

Revit Family Formula Examples and Tricks

Great idea and list from Todd Shackelford over at CAD Shack about formulas.....


Revit Family Formula Examples and Tricks

When creating formulas in a family it is helpful to have a go to list of examples. Here is mine.

IF Statement
IF (Length < 30′, 2′ 6″, 4′)    
     If the Length parameter is less than 30' x = 1 , y = 22'-6"
     If the Length parameter is greater than 30' this parameter will have a value of 4'-0"

IF that Returns a String
IF (Height > 30′, “This thing is tall”, “This thing is short”)     
     If the Height parameter is greater than 30' this parameter will return  This thing is tall
     If the Height parameter is less than 30' this parameter will return  This thing is short
Nested IF Statements
IF (Length < 35’, 2′ 6″ , IF (Length < 45′, 3′ , IF (Length < 55′, 5′, 8′ ) ) )
     If Length is less than 35', this parameter will have a value of 2'-6"
     If Length is between 35' and 45', this parameter will have a value of 3'
     If Length is between 45' and 55', this parameter will have a value of 5'
     If Length is greater than 55', this parameter will have a value of 8'

IF applied to a Yes/No condition
Length > 40' 

     If Length is greater than 40' the the statement is true and the Yes/No check box is checked
     If Length is 40' or less the statement is false and the Yes/No check box is NOT checked

IF (OR (A = 1 , B = 3 ) , 10 , 5) 

     If A = 1 or B = 3 this parameter will have a value of 10
     If A is not = 1 and B is not = 3 this parameter will have a value of 5

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

     If x = 1 and y = 2 this parameter will have a value of 8

     If x is not = 1 or y is not = 2 this parameter will have a value of 3

Some Formula Tricks of the Trade

This or That only with a Yes/No parameters

By specifing that metal can not be true while Wood is true the user can only specify one of the two materials. They both can not be checked at the same time. This can be used for visibility where a left or right access panel may be required but never both.

Pick One and Only One

Here the condtion number will allow only one paramter to be true in a list. Associated with a type, you could control a ton of things simply back picking the correct type.

"Don't Change Me Bro"

If you need some text to not change, put that text in the Formula column with quotes around it. It greys it out in the Value column. This should stop the majority of users from changing its value.

Swapping Nested Families
In a bookcase family with a nested shelf family, follow these steps to add a parameter that will allow the user to switch from one type of shelf to another.

1. Open the original shelf family and save it as the second shelf option. Add something to make it different. 

2. Load this new shelf into the bookcase family, but do not place it.

3. In the Family Types dialog create a new Type parameter named “Swappable Shelf”. Make its discipline Common, its Type of Parameter and group it under Constraints.

4. When you select the Type of Parameter Revit will open the Select Category dialog. Pick Generic Models.
5.  Select the original shelf in the bookcase family now. In the Properties dialog, look for the Label parameter and change it to “Swappable Shelf”.
6.  In the Family Types dialog Create 2 shelf types, Shelf Type 1 and Shelf Type 2. Associate the swappable shelf parameter with the appropriate type.
7. Flex the family. Change the family type and verify that the shelf changes.

Tuesday, May 22, 2012

Restore Backup-Error Occurred

Some OLD interesting info from Revit Clinic - must save here for later!

Cannot Restore Backup Version an Unknown Error Occurred

If when attempting to restore the first version of a backup you receive "An unknown error occurred while accessing xxx.rvt" and then "Failed to extract old document version" the following scenario may apply:
You save a central file for the first time or re-save a project as a central file in a new location.  Under Save-As > Project > Options > Preview you specify a source view for the preview image other than Active View/Sheet:
However this view is not open when the project is saved, so no thumbnail is created.  Thus in the Revit database, no preview.xxxx.dat is created with the first version of the backup.
Then you later attempt to save a backup version of the project under Collaborate > Restore Backup.  You attempt to Save As… the oldest backup version when the central file was originally saved.  But you receive An unknown error occurred while accessing xxx.rvt then Failed to extract old document version:
When re-saving or saving a central file for the first time, and specifying a view for the preview other than Active View/Sheet which may not be open when the file is saved, check Regenerate if view/sheet is not up-to-date.  This will create a thumbnail for the non-opened view to be included with the initial backup version and eliminate the error message when saving the backup version.
Regenerate  to recover some important data.

Monday, May 21, 2012

quick tip will shave off a few seconds for Revit

quick tip I came across today over at The Revit convert:


Want to (slightly) speed up Revit?

Here’s a quick tip that will shave off a few seconds for Revit.
  • Right-click on the Revit icon on your desktop.

  • Click on the Properties option on the right-click menu.
  • From the Properties palette and in the Target box, go to the very end of that long sequence and add {spacebar}/nosplash. (please do not type {spacebar}, that is just my indication that you use the space bar) :)

  • Click OK.
The nice splash screen that always stares you in the face when starting up Revit will disappear, thus saving you a few seconds on your load time.
NOTE: For you AutoCAD-ites, the same procedure above applies EXCEPT you add {spacebar}/nologo

Monday, May 14, 2012

Revit 2013 Component Based Stairs

designreform posted a nice vid of a Revit 2013 new feature....

"In this Revit 2013 video tutorial we'll do a fairly quick overview of the new Component Based Stair tools. The idea is to help get a better understanding of how the tools work and how the interface it put together. In future video we will go in more depth for all various types of stairs." Thanks for your work Case Inc.!

Thursday, May 3, 2012

Revit OpEd: Working at Risk

Revit OpEd posted:

Working at Risk

This situation occurs when your Revit session can not find the central file. This could happen through no fault of your own. For example it could happen because the project's server is down, a router is malfunctioning, your network cable was unplugged by the cleaning crew and so on. Of course those would present themselves in other more obvious ways like not being able to get your email, see folders on the server or even log onto the network. It could also be caused by someone deleting the central file, the central file's backup folder, someone saving over the central file or some other nefarious circumstance.

It can also be caused by taking your local file home with you. When you open a Revit project, that has had worksets enabled, Revit "talks" with the central file. If it can't find it you'll get an error message.

That's your first warning that things aren't safe to continue working. At this point I encourage you to stop, see if you can find out what's wrong, assuming you don't already know. If you push forward and try to alter something in the file, using element borrowing, you'll get this message.

That message is preventing you from using element borrowing. If you really want to continue to work at risk you'll need to open the Workset dialog and make the workset the element is assigned to editable, which makes you the Owner of the workset. You won't be able to do this either without getting another warning dialog.

If you click Yes you'll be able to do what you want with any elements assigned to the workset you've made editable (you are the owner of the workset). This is where things will go very wrong. If someone else does this too or still has a valid connection to the central file you are working "at risk". As soon as another person does something that Revit has either given them permission to do or creates a conflict of ownership somehow...the first person to resolve it will win...the rest will lose.

If you must go down this road you need to discuss what you need to do with the other people working on the project so they either stay away long enough for you to get things done or agree to be very careful about what they do. Go slowly, methodically...carefully.