How to pass Revit Elements parametrically to ConnectionNode.FromStructure? (Type Mismatch Error)

Hi everyone,

I am working on a script to automate steel connections, but I am stuck trying to make the input selection parametric.

Currently, the available nodes like SelectStructureData require me to manually select elements every time, which isn’t suitable for my workflow. I want the script to automatically grab all or specific elements from the model whenever it changes.

I have successfully filtered my Structural Framing elements using standard Revit nodes (as seen in the top Watch node in the attached image). However, when I try to feed this list of elements into ConnectionNode.FromStructure, I get the following error:

It seems I need to convert my Revit StructuralFraming elements into the ModelObject or StructureData format that the Connection Automation package understands.

Does anyone know the correct node or workflow to convert Revit elements so they can be accepted by ConnectionNode.FromStructure without using the manual selection tool provided by connection package?

Thanks in advance for your help!

Here is the answer if anyone needs it in future

1 Like