-
Notifications
You must be signed in to change notification settings - Fork 14
Remove from Revit details
This chapter explains in detail the Remove action - it is recommended to read Revit Adapter details section first for the information about mechanics of the adapter itself.
As explained in Remove from Revit basics, there are two action-specific inputs that drive Remove:
-
Request of type deriving from
IRequest
explained in more detail in a dedicated section -
Action config of type
RevitRemoveConfig
They are specified as arguments of the Revit
method of RevitAdapter
. Depending on the thread on which the Remove
method is executed, they will be either sent via Sockets as a data package (if Remove
is executed outside of Revit thread) or passed directly to RevitUIAdapter
(if everything is run on a single Revit thread).
Next, RevitUIAdapter
triggers Remove action, which points directly to Delete
CRUD method. Delete
executes following tasks:
- Collects ElementIds of Revit elements that meet requirements set by the Request (done in
BH.Revit.Engine.Core.Query.ElementIds
). - Deletes the Revit elements under ElementIds from point 1.
Finally, the number of deleted elements is returned to RevitAdapter
(using a Sockets bypass if RevitAdapter
and RevitUIAdapter
do not run on the same thread).
The diagram below maps out the above workflow - it should be read as an action-specific variation of the Adapter action stage of the general Adapter flowchart.
-
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