06 Jun

Dynamo: Use Excel Coordinates to Create Model Lines in Revit

If you have many coordinates in Excel spreadsheet or in other table format, it’s easy to use the power of Dynamo to get those coordinates into Revit.

In our example, we will use x, y, z coordinates to create model lines within Revit project.

There are two ways to approach this problem:

  1. Coordinates represent continuous points (like in polyline)
  2. There are pairs of coordinates, each pair representing single line

Both examples are displayed in scripts below, with the main difference in the way of cutting list of coordinates.

Download the scripts from here

 

Coordinates represent continuous points (like in polyline)

Position X Position Y Position Z
897.632 868.432 30
904.781 875.425 30.1
911.929 882.418 30.2
919.078 889.41 30.3
926.66 895.914 30.4
934.148 900.538 30.5
944.498 904.753 30.6
954.267 906.835 30.7
964.215 907.852 30.8
974.97 908.926 30.9
984.116 909.84 31

(click on the image to enlarge it)

Revit will result with polyline such as this one:

There are pairs of coordinates, each pair representing single line

The sample table below is used in our example. You can copy paste it into your excel, or create your own.

x1 y1 z1 x2 y2 z2
0 0 0 5 0 0
5 0 0 5 5 0
5 5 0 0 5 0
0 5 0 0 0 0
0 0 0 0 0 5
0 0 5 5 0 5
5 0 5 5 0 0
5 0 5 5 5 5
5 5 5 5 5 0
5 5 5 0 5 5
0 5 5 0 5 0
0 5 5 0 0 5
0 0 5 2.5 0 7.5
2.5 0 7.5 5 0 5
0 5 5 2.5 5 7.5
2.5 5 7.5 5 5 5
2.5 5 7.5 2.5 0 7.5

 

(click on the image to enlarge it)

Dynamo will result with this little house:

 

Download the scripts from here

09 May

Revit Tips & Tricks #2

Project model environment

 

1. How to change temporary dimensions behavior

When modeling elements, Revit will suggest and put temporary dimension lines with which elements can be places precisely.

If Temporary Dimension lines in Revit are snapping to references that you think are wrong, you can always check the settings and set up prefer referenced to which temporary dimensions will snap.

 

2. Default IFC Revit project template

When linking IFC to Revit, two things happen:

  1. To create IFC file Revit picks first Revit template set in File > Options > File Locations
  2. Revit creates RVT file from that IFC model and saves it in the same location (folder) where IFC file is with the same file name as IFC.

Linked IFC (it’s actually Revit model file described earlier) can be found in Manage Links dialog on IFC tab where it can be reloaded if newer IFC file (under the same name) is saved into the IFC folder. Reloading means creating linked Revit file again.

To minimize IFC file size and load time, it is recommended to create separate Revit IFC template, which contains essential settings, such as line weights, line patterns, object styles and one level. This templeate should be first on the template list in Revit so it’s used every time IFC is loaded into project.

 

3. Change Cable Trays, Pipes, Ducts, Conduits level without moving elements

It’s a big deal if you have whole systems modeled in Revit just to realize that they need to be on another level. For point elements (such as ligthing or electrical fixtures) it’s not a big deal, but if you have pipes or other listed above, which are linear elements, and they also have slopes, you are in a lot of trouble. Revit will allow you to change the level for those elements but it will then put them on new level and keep the offset RELATIVE to that new level.

To change levels of elements in Revit but keep them in the same APSOLUTE place, use Dynamo script I created for this purpose:

Change Revit family level reference without moving elements

 

4. Create multi-category list containing some of system family categories

Multi-category schedule will not schedule system families.

To schedule system families, use multi-category material takeoff schedule in Revit. Next picture shows such example from Revit sample architectural project model (sorted by Category, Show all instances set to false):

But what if we just need want Ceilings, Floors, Roofs and Walls?

Well, the trick is to add unique shared parameter only to those categories you want to have together in a schedule and then filter by “parameter exists” schedule rule.

Let’s add shared parameter called “Layered”, of yes/no (Boolean) type. It will be added only to Categories mentioned above (you need to create it in your shared parameter file first):

Finally, if we add that parameter to the schedule and filter by rule “Parameter exists”, our table will have only wanted categories:

There are two tricks here that are not obvious:

  1. You cannot add parameters to system family categories trough Revit schedule Fields dialog, you must go to Manage > Project Parameters
  2. “Parameter exists” filter rule in schedules is available only to shared parameters

 

5. Compare Wall, Floor, Ceiling or Roof types to find duplicates

Finding duplicate layered types in Revit is not easy since layers in layered types are defined with multiple different settings:

  • Is layer inside of a core?
  • Layer Function
  • Layer Material
  • Layer Thickness
  • Is Layer defines Structural Material?
  • Can layer be of variable thickness?
  • Can Layer Wrap?

Additionally, Walls have options Wrapping at inserts and wrapping at ends.

If we ignore all of the other type parameters which can make a difference between one type and another, we can compare layered instances using Engipedia Layers Manager (since version 1.1.) and Multi-category Material Takeoff table from previous trick.

For example, if we set up add-in options like this:

Add-in will create comparison string containing only function of each layered type. The same principle can be used to find elements with the same materials with the same thickness or regardless of thickness and other layer properties.

 

Families environment

 

6. Saving family as family template

Revit uses the following file name extensions:

  • .rvt – Revit project file
  • .rte – Revit project template file
  • .rfa – Revit family file
  • .rft – Revit family template file

You can save from Revit to all of the file extension types except the rft extension. To get file as rft, you need to save it as Revit family (.rfa), and just change the extension to .rft

Why is this useful? Well, you can set up a family with your parameters, line weights, lines patterns, fill patterns, materials, object styles, subcategories and other, save it as family and use it as a template for future families.

If you save it to default path for family template files (set under File > Options > File Locations)

For example: C:\ProgramData\Autodesk\RVT 20xx\Family Templates\English\

it will be available every time you go to create a new family.

(change RVT version number and language appropriately)

 

7. Create fixed value family parameter

The trick to create family parameter which value cannot be changed by user in Revit project environment, set it by formula of the following syntax:

IF((1 = 1), “Fixed value”,  “any value”)

  • Note that this will not work for parameters that cannot be set by formulas, for example Materials.
  • Note that if you set this in type parameter, it will have the same value for all types.
  • Note that you must use (1=1) in parentheses since Revit will give you “Invalid Formula” if you use 123 456 789,00 units number format in Revit family editor.

 

8. Find out if number is even or odd in Revit family

In Revit family, if you want to test if a number n is even or odd, you can use the following formula:

if(roundup(n/2) = rounddown(n/2), “even”, “odd”)

The trick is that roundup and rounddown function will round number differently when number is different from integer.

for example, for n=3

  • roundup(3/2) = roundup(1.5) = 2
  • rounddown(3/2) = rounddown(1.5) = 1
  • 1 != 2, meaning  it’s odd number

for example, for n = 4:

  • roundup(4/2) = 2
  • rounddown(4/2) = 2
  • 2=2, meaning it’s even number.

You can also use even/odd mathematical functions to find out if an number is even, odd, integer or exactly half.

In Revit, for example, cosine function can do the trick of determining if a number is even or odd (since cosine is even function itself):
if (cos(n * pi (or 180°)) = 1, “even”, “odd”)

Both cosine and sine can be used to tell you if something is exactly half or an integer, for example:
if (cos(n * pi (or 180°)) = 0, “exactly half”, “not half”)
if (sin(n * pi (or 180°)) = 0, “whole number / integer”, “not an integer”)

* pi or 180° depends on your angle settings in Project Units dialog.

 

9. View Range in Family editor

Do you know that you have View Range dialog available in Revit family editor as well.

The trick is that you need to click on the view name, not on the empty space inside of view. That way, when view name is selected, you will get all associated view properties in the properties panel, see image for instructions:

You have also crop box in family editor available on 3D view, but it mostly don’t work as expected.

 

10. Can’t move in Revit family? Cut/paste to same place

In Revit family there is an issue when you try to move family objects up/down, or any direction which includes up/down movement, regardless of Constrain checkbox status.

For example, family on the image below cannot be moved up, even if Constrain is unchecked and mouse is pointing up. Revit only allows left/right movement in the Front view.

But, if select family objects, do Cut and Paste to Same Place and then try Move command again:

Now family is detached from anything it was attached to and can be moved to any direction.

Use this trick carefully considering your parameters and dimension lines sets.

 

Hope you learned something new, if yes, please comment in the comments section below!

If you have not already, read Engipedia Revit Tips & Tricks #1 blog as well.

26 Jan

Memes

Revit got you frustrated? Try healing power of Revit / BIM humor.

The whole point of this post is to blow off some steam. If just one of the memes make you smile than our mission is accomplished!
We will add more memes over time, so make sure to check it again from time to time.
Read More

08 Jan

Revit Tips & Tricks #1

Project model environment

 

1. Zoom-to-object

In 3D Revit view, it’s possible to do zoom-to-selection without additional add-in application. Just click on an object instance and then onto Revit View Cube – Revit will zoom to that selected object.

2. Change door/window wall host

To change door or window wall host without modeling or placing door/window again (and keeping it at the same place and of the same type) is easy:

  1. Select door/window instance(s), do “Copy to clipboard” (Ctrl + C).
  2. Delete or move the old wall (this action will also delete all hosted elements of that wall, including those you just copied).
  3. Create new wall and do the “Paste > Aligned to same place” action.

This is useful in situations when we have, for example, a wall running across several stories and we want to divide it into pieces (walls per story) but, at the same time, we do not want to lose and model doors/windows (or other wall hosted elements) again.

3. Drawing sections precisely

Revit Section tool does not snap to objects in general. This is quite a problem when you do not have orthogonal project and you need angled section aligned with something that is not perfectly horizontal or vertical.  Section tool does, however, snap to Reference Planes (and special kind of Reference Plances: Grids and Levels).

To make perfectly aligned angled section, first create Reference Plane (which can snap, be parallel or ortogonal to object/s). Then run Revit Section tool and snap it to that Reference Plane.

4. Orient to View with the help of the View Cube

In Revit 3D View, it’s easy to check what particular 2D view shows, for example, floor plan or section. To make the check, in 3D view you need to right-click on the “View Cube”, go to “Orient to View” and in the drop-down menu navigate to the 2D view (Floor Plan, Section, Elevation or 3D View).

If you, for example, select one of the sections, Revit will turn on “Section Box” and adjust its limits to match the section span.

If you choose one of the existing 3D views, Revit will orient current 3D view the same way as the chosen 3D view. This is practical if we are combining several 3D views on the sheet as some kind of composition. In such case have in mind that all 3D Revit views on the sheet must have the same scale to be the same size on a sheet.

5. To easily rotate a view on a sheet

Revit model views are aligned towards the “paper north” according to Revit Project North setting. Sometimes this can be an issue during documentation preparation phase when some or all views need to be orientated differently. Changing Revit Project North property later, when most of the model and documentation is developed, will lead to unwanted results (model corruption and deletion of many elements and annotations).

The most easiest solution is to rotate “Crop Region”. In a view, turn on “Crop View” property and “Crop Region Visible” property. Select Crop Region boundary and use Rotate tool to rotate view, it will rotate it on the sheet.

It’s possible to do it on the Sheet, but you need to double-click on a view to open it on the sheet.

6. Navis view for Navisworks

When pulling Revit model into Navisworks, there is a feature (option) in Navisworks (N > Options > File Readers > Revit) called “Navisworks view”. “Navisworks view” is a 3D view from Revit which name begins with “Navis” (without the quotes).

This is practical and important because we can easily adjust the view in Revit, such as turning visibility of elements on and off, so only elements in this set view can be pulled into Navisworks instead of all objects we have in Revit model.

If you have Parts visibility turned on in Revit view, it is important to turn on option to “Convert construction parts” in Navisworks, as it is shown in the image above.

Families environment

 

7. When Reference Plane is “Not a Reference”

If you are creating or adjusting Revit family, one of the most important things to know, regarding Reference Planes in Revit families, is setting them as “Not a Reference”. It is recommended to run the Reference Plane command in Revit family editor, and then set Is Reference parameter to “Not a Reference” before you draw the reference plane. Then draw the reference plane. When you do it like this, set option “Not a Reference” will be automatically set when you run the Reference Plane command again.

Why is this important?

When reference plane is set as “Not a Reference”, then dimension lines in project environment will not snap to such reference (for example, imagine a door family with many references planes to which your dimension lines snap, instead of only two or three – middle and both ends).

When reference plane is set as “Not a Reference”, and in Revit family editor you place dimension line with instance parameter on it, in project environment, you will not get those little double triangles with which is possible to change a dimension on-the-fly (stretching). The only way to change such parameter is to input value into parameter in the properties panel.  Sometimes we want those triangle stretching widgets, in which case reference plane should be set to anything but “Not a Reference” (and needs to have dimension line with instance parameter attached to it, of course).

8. Set Subcategory to objects in Revit family

Every body (object) in Revit family, made with one of the tools (Sweep, Extrusion, Revolve etc.) can have it’s own subcategory. Default subcategory is actually category of the family. For example, if we are creating reinforced concrete structural column family, that column will probably be in “Structural Columns” category, and all elements that make the column will be in that category by default. However, if you select one of the elements in family, you can assigned custom (made-up) subcategory of Structural Columns category, such as “Concrete” or “Concrete Columns”. This approach allows us to set additional settings only to the elements of that subcategory regarding their graphical appearance in the “Object Styles” and/or “Visibility/Graphic Overrides” dialogs in Revit project environment. For example, we can set that all columns have thin lines in section but all columns of “Concrete Columns” subcategory have wide lines in section. Setting it such way in Object Styles saves time and improves model and documentation consistency.

Image below: selected family element in Revit family editor with Subcategory property set to “None” by the default.

Figure below: in the “Object Styles” dialog in Revit family editor, click on the “New” button to create additional custom subcategories under the family category.

Figure below: setting custom subcategory to selected family element in Revit family editor allows us to set subcategory graphic properties in family, or later in Revit project environment. Settings in Revit project environment are “stronger” than settings in Revit family editor.

9. “Split Face” and “Paint” features in family editor

One of the ways to save time and polygon count is using Split Face and Paint tools in family editor. You can find them on Modify tab, under Geometry group.

“Split Face” tool in Revit allows us to split 2D face into two or more custom shaped areas. Then, it is possible to add different face material to any of such areas. With “Paint” tool you can add different materials to object faces in Revit, no matter if the face is split with “Split Face” tool or not. Drop-down menu under the “Paint” tool has also “Remove Paint” tool with which you can remove painted materials.

Good thing is that all three tools also exist in Revit family editor, so if we want to add another material, we do not need to model extra bodies for it, we can just paint it and save on polygon count.

Main disadvantage of such approach is that painted materials can’t be parametric.

10. Create repeating 2D details as model filled region

If you need repeating 2D elements in Revit family, for example lines, grids, angled lines etc., instead of using Array command which is relatively complicated and kills family performance, better alternative is to use nested 2D Detail Item family with Model Fill Pattern.

Similar as in the example of closet floor plan symbol made with two model fill patterns in nested detail item family (stretching the closet will add as many symbolic lines as needed without worry about breaking the family): https://www.engipedia.com/warehouse/revit/revit-2015/simplified-closet-box/

If you have not already, read Engipedia Revit Tips & Tricks #2 blog as well.
10 Jul

Rotate Revit family into any direction

Don’t you hate “Can’t rotate element into this position.” error message in Revit?

Let’s say you need to rotate element into a position in which Revit will not let you. There is a simple solution, but it includes creating additional family.

For our example we will take a book family with “Always vertical” parameter turned on. It does not matter, we do not need to switch it off. Read More