Skip to content
Pawel Baran edited this page Apr 10, 2020 · 29 revisions

Notes

  • It is worth having a look at Using the BHoM section and the rest of Revit_Toolkit Wiki before reading this page.
  • All scripts are presented in both Grasshopper and Dynamo. All source files are available in samples.
  • It is highly recommended to switch to Manual mode when working with Dynamo and BHoM.

Pulling selection

One of the more practical ways to specify elements for pull is simply selecting them in Revit and using FilterBySelection.

Pull selection in Grasshopper


Pull selection in Dynamo

Complex filters

It is possible to combine multiple filters with each other to create very specified queries. The example below shows how to pull all elements that can be converted to either structural bars or structural panels, which also have a parameter Structural (checkbox type) equal to true.

Complex request 1 in Grasshopper


Complex request 1 in Dynamo

Sometimes pull needs to be done in more than one step. Below it is shown how to first pull the active view and then use it to pull all detail items that belong to it.

Complex request 2 in Grasshopper


Complex request 2 in Dynamo

Another example of two step pull is pulling family type: first the family itself is pulled, then it is queried for all its types. Worth noting is the fact that error in Grasshopper component is caused by the empty input - once the pull is executed successfully, it will turn standard gray.

Complex request 3 in Grasshopper


Complex request 3 in Dynamo

It is important to distinguish pulling types (above) from pulling elements of a given type. Example below shows the latter (pulling actual HEA 300 beams, instead of HEA 300 family type).

Complex request 4 in Grasshopper


Complex request 4 in Dynamo

The next example shows how to pull plan views, which name starts with Structural prefix. Such view can be then manipulated (with Push) or used for further queries.

Complex request 5 in Grasshopper


Complex request 5 in Dynamo

For those familiar with Revit API, it is possible to filter the elements by their API type. It is worth noticing that this method works only for types that inherit from Autodesk.Revit.DB.Element.

Complex request 6 in Grasshopper


Complex request 6 in Dynamo

Disciplines

As mentioned in Conversion from Revit section, depending on the discipline set in Action config, Revit elements can be converted to different BHoM objects. A vivid example of that is shown in the script below. Revit walls are being converted to:

  • BH.oM.Physical.Elements.Wall for Physical discipline
  • BH.oM.Structure.Elements.Panel for Structural discipline
  • BH.oM.Environment.Elements.Panel for Environmental discipline

Pull disciplines in Grasshopper


Pulling energy analysis model

Energy analysis is a specific discipline that requires information about meta information (e.g. topology or building location) that is often not needed for other disciplines. Therefore EnergyAnalysisModelRequest in order to ease the process of pulling comprehensive data from Revit energy analysis model.

Pull energy analysis model in Grasshopper


Pull energy analysis model in Dynamo

Pulling edges

A hidden feature of action config: pulling any elements together with their edges as shown in Revit! In case below, of framing elements. Following Conversion section, the edges are stored in BHoM object's CustomData under Revit_edges key - easiest way to retrieve it is to use GetProperty component (only in Grasshopper), alternatively the object and its CustomData can be decomposed with Explode.

Pull edges in Grasshopper


Pull edges in Dynamo

Clone this wiki locally