Skip to content

Pull in Grasshopper

Pawel Baran edited this page Apr 10, 2020 · 17 revisions

Note: Before reading this page, it is recommended to have a look at Using the BHoM section.

Basics

Having the adapter successfully set up, one can start interacting with Revit. Pull behaves like a standard Grasshopper component, so can be placed on canvas with a standard double left click action. Request, on the other hand, is a solely BHoM type, therefore it is easiest to invoke it with Ctrl+Shift+B menu, with an alternative of using CreateObject component (CreateRequest is currently on prototype stage and does not capture all Requests).

The example below shows a simple exercise of pulling all Revit elements that can be converted into BHoM IFramingElements (which capture both columns and framing). There is a few details that might be worth noticing:

  • FilterByBHoMType expects a type and not an instance. In Revit language, the user is expected to provide a element type and not the element itself. Therefore, CreateType component is being used.
  • Explode is a general use component that allows to quickly see all properties of any BHoM object. It is very useful and can be applied almost anywhere.
  • Pull will not run as long as it is not activated (active == true).
  • The pull component is turning orange indicating that it threw a warning. That is often acceptable, although should never be left unnoticed.

Pull in Grasshopper

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

Complex requests

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 (full size). 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

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 (full size). 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, alternatively the object and its CustomData can be decomposed with Explode.

Pull edges in Grasshopper

Clone this wiki locally