-
Notifications
You must be signed in to change notification settings - Fork 14
Handling of Parameters
Efficient handling of Revit parameters is one of the key features of Revit_Toolkit. It is possible thanks to RevitParameter
BHoM wrappers that are being generated per each parameter of an element (and its type) on Pull and unwrapped on Push. RevitParameters
are stored in dedicated fragments that are attached to the BHoM object correspondent with the Revit element. For full control over what is pulled vs what is pushed, separate fragments for Pull (RevitPulledParameters
) and Push (RevitParametersToPush
) are used.
More details can be found in the next paragraphs, examples are available here.
As mentioned above, on Pull, the parameters of a Revit element get wrapped into RevitParameter
objects, which are collected in RevitPulledParameters
fragment attached to the BHoM object representing the element. Such parameters can be queried in two ways:
- all in one go using
GetRevitParameters
method - value of a particular one using
GetRevitParameterValue
method
Out of the box, default parameter values will be assigned when creating a Revit element based on a BHoM object. This can be overwritten by setting the parameters to push (stored in RevitParametersToPush
, as described in the first paragraph) with SetRevitParameter
method. Similarly, when an existing element is updated on Push, only the parameters explicitly instructed to be overwritten (SetRevitParameter
method) will change.
By default, when a Revit element gets updated, first its parameters are overwritten and then the location is updated. This means that if the user sets values to location-related parameters, the change may not take place due to being superseded by location update. To avoid that, it is possible to prevent the element's location from being updated by switching SetLocationOnUpdate
property of RevitPushConfig
to false
.
-
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