I wanted to get the points of a roof, exactly as described in this thread from two years ago:
As you can see in OP’s error message, there is a type-mismatch.
One glance at the Dynamo codebase on Github shows that the Dynamo.Elements.Roof class is a Dynamo-specific wrapper around Revit.DB.Elements.Roofbase class, as the revit class is an internal property nested inside the Dynamo class.
Ideally, the user expects dynamo nodes to operate on Revit types. Ideally the design of a Dynamo node, especially a node in base Dynamo if wrapping a Revit type, must handle conversion to and from a Revit type.
I’m not sure any node in base Dynamo Elements > Roof menu can be used, as there’s no clearly defined node to change type. And a “Select Model Element” node is useless as demonstrated above. Any suggestions on what I’m missing?
Also, i’m guessing that Dynamo.Revit.Point is another wrapper. Is there any documentation of a mapping between Revit types and Dynamo types, including a reference on how to perform type conversions?
A little more research shows that there is no public constructor or static method around to create a Dynamo.Elements.Roof which could possibly be used to build a custom dynamo node.
The class does have an internal static method called FromExisting which is exactly what we need to build a custom Dynamo node to convert the two, however it’s internal and not accessible.
A search of the codebase shows that the FromExisting method isn’t called anywhere else in the codebase:
Should I open an issue on Github to request that FromExisting be changed from internal to public ?
Same situation, here, I need to extract some roof points and try to do additional operations, and the node asks for a Revit.Elements.Roof, and “Select Model Element” gives a Revit.Elements.Element. It’s been a while since i opened dynamo, maybe there is a node with a different name that works?
I would like to share that our team has successfully implemented a new solution and we’re diligently working to enhance the workflow usability. The workflow will be fully operational in the future, and we’re making great progress towards bringing it as soon as possible.
Problem:
The team discovered that there was an issue around selection and filtering nodes in case of roof category elements. The output FootPrintRoof/RoofBase element instead of Roof element caused warnings and lack of functionality in specific roof nodes like Roof.Points, Roof.AddPoint and Roof.MovePoint.
Solution:
The fix consisted in changing the wrapper type in the output of selection and filtering nodes in case of roof category elements.
Thanks to this fix, now all selection nodes when used for the roof category elements, will return Roof with the same element ID as the previously returned output FootPrintRoof/Roof base, fixing warnings and missing functionalities caused by the previous unknown element output.
Let me know if you need further explanation. Will do my best to answer