-
Notifications
You must be signed in to change notification settings - Fork 15
Push examples
- 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.
As mentioned in Push to Revit basics section, Revit element types are name matched BHoM object properties. Therefore, the only property that is relevant for Construction of BHoM walls and floors as well as Property of BHoM framing elements is their name - all others will be simply ignored on Push.
The scripts below show how to push a primitive building to Revit. To make that happen, family types with names used in the script need to be loaded to the model. PushType is set to CreateOnly, which means that the attempt to update the existing elements will not be made.
ModelInstances can be used to push objects of types that are not natively supported by BHoM. A sample below shows how to apply this technique to mechanical ducts.
Similar approach can be used to drafting instances: the next script generates a line load representation of family Linear Loads and type Load Label 2mm in view named Load Plan Level 0.
If only the name is specified on definition of a model instance or drafting instance, it will be converted into a primitive (model line, detail line, filled region etc.):
Note: Update is currently in prototype stage and might not always work as expected.
Once the element is pulled from Revit, one can e.g. change one of its parameters (by using SetProperty) and push back to Revit, as shown in the example below. To update the elements instead of creating new, PushType needs to be set either to UpdateOnly or DeleteThenCreate.
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. Similarily, the warning on Push does not always need to mean that the push had not succeeded - it might happen that e.g. the update of location had not worked, but it was not meant to happen actually.
Not only elements can be manipulated. Update can be successfully applied to families or types as well, for example to batch rename or changing any other settings. It is worth noting that if the name parameter is left blank on family pull, all families in the model are being pulled in one go.
-
Overview:
What is Revit_Toolkit for?
Code structure
Building from source and debugging
License
Sample scripts -
Adapter:
Basics
Revit <-> BHoM conversion
BHoM vs Revit identity
Handling of Parameters
Conventions
Setup in Revit
Setup in Grasshopper
Setup in Dynamo
Setup in Excel
Details -
Pull:
Basics
Requests and filtering
Pull of Geometry and Representation
Pull from Links
Pull in Grasshopper
Pull in Dynamo
Pull in Excel
Examples
Explicit family vs type mapping
Details -
Push:
Basics
Push modes
Updating Revit types
FamilyLibrary
Push in Grasshopper
Push in Dynamo
Push in Excel
Examples
Details -
Remove:
Basics
Remove in Grasshopper
Remove in Dynamo
Remove in Excel
Examples
Details -
References:
BHoM Wiki
BHoM Adapter











