Skip to content
Pawel Baran edited this page Apr 9, 2020 · 8 revisions

Note: It is highly recommended to switch to Manual mode when working with Dynamo and BHoM. Besides that, it is worth having a look at Using the BHoM section before reading this page.

Basics

Having the adapter successfully set up, one can start interacting with Revit. In general, Remove action is very similar to Pull (although instead of pulling it deletes elements). Remove component behaves like a standard Dynamo component, so can be placed on canvas with a right click action (or by selection from side menu). Request, on the other hand, is a solely BHoM type, therefore it requires using CreateObject component (CreateRequest is currently on prototype stage and does not capture all Requests).

The example below shows a simple exercise of deleting all Revit elements that have value of Mark parameter equal to Pc-2.1. There is a few details that might be worth noticing:

  • FilterByParameterText allows prefiltering the objects before interacting with them.
  • TextComparisonType input of FilterByParameterText is an enum, in other words it is a limited choice value. To create such a value, one needs to use CreateEnum component, which will provide the user with a dropdown to choose from.
  • Required input type can be looked up by hovering the mouse over a certain input.
  • Remove will not run as long as it is not activated (active == true).

Remove in Dynamo

Removing pinned elements and closed worksets

By default, Remove will not delete pinned elements as well as the ones on closed worksets. To enable processing the mentioned groups, the user needs to set the action config (typically created with CreateObject component). The script below (full size) shows how to delete all generic annotations from the model, incl. pinned ones and ones on closed worksets.

Remove pinned in Dynamo

Samples

All sample scripts are available in Revit_Toolkit samples.

Clone this wiki locally