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
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
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:
Scenario
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:
PreviewSource
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.
Issue
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:
Error2
Solution
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