Hello!
I have recently created a Dynamo package, written entirely in C#. It was my first ever take on Dynamo with C#, so I will be really happy to get any ideas / remarks / recommendations At the moment, it is only on GitHub, but I am planning on eventually publishing it on the package manager.
Here’s a link to the repo: GitHub - Danail-Momchilov/DynaBIMToolbox: A collection of C# Nodes for Dynamo
The main objective was to enhance and optimize Boolean operations, which normally take quite a lot of time in Dynamo. Instead, they are performed in the Revit API directly - the package lets you work with Autodesk.Revit.DB.Solids, while providing nodes to help you ‘wrap’ and ‘unwrap’ them if you want to. With some of the nodes I also tried to solve some features the API is currently lacking (mostly using workarounds, nothing too fancy).
One good example is the possibility to retrieve element oriented bounding box:
I am aware there is already a node in version 2.16 that is doing that to a certain extend, but it still requires that you get all the element geometry in Dynamo first. So this will again be quite slow and panful when working with a large number of elements.
Another node I find might be quite useful is RoomSurfaceIntersectionAreas. It would create all wall surfaces for a room, intersect them with a list of solids (given directly as Autodesk.Revit.DB.Solid) and return all the intersection areas, as well as all the remaining wall surface areas for the room. This is all done in the API directly, so the process is quite fast even for a large number of rooms and solids.
This was actually the main reason to start working on that package in the first place - calculating wall surfaces for large scale models with lots of geometry and data, with either all or some of the geometry being in linked files (performing the calculations only using formulas does not work when the room and geometry are in different files). Anyway, there are also other variations of this node
along with other useful tools for retrieving data from elements and linked instances, getting walls solids as RevitAPI Solid, getting transformed solids directly from linked instances, getting linked elements’ levels, handy find and replace tools for lists, etc.
You can find quite detailed documentation for almost every node in the package in the GitHub repo.
Once again, any feedback would be highly appreciated
Cheers!