Handing Control of the Structural Framing Beam by Curve to Revit

We are trying to generate a series of structural framing elements using the Structural Framing Beam by Curve

Start and endpoints are generating OK and the Revit elements are created successfully however, control of the objects cannot be released to Revit and when we re-run the script with different input selections, the objects previously generated are lost and the new elements are generated in the alternative locations.

WE have tried to release the elements to Revit by setting the ToDSType(False) but this does not seem to work.

We think the problem is that the points are still controlled by Dynamo and re-running the script just moves the original points to new locations.

Any help with this would be appreciated.

Please post your complete dyn for testing, ideally with an associated Revit file.

If you do not have enough privileges to post here use another file sharing service like google drive, Dropbox, or similar.

If you use the node “Structural Framing Beam by Curve”, then the framing elements generated will be kept in Dynamo’s memory using the element binding properties of Dynamo. The workaround is Python, but you cannot simply pass the already generated elements into then back out of Python to remove the binding. What you have to do is pass the start/end points into Python, construct a Revit curve using the points, then use the API method Document.NewFamilyInstance(Curve, FamilySymbol, Level, StructuralType) to generate the Framing. I don’t beleive this method will use the element binding.

Note that many others also want a built-in workaround for the element binding problem - see link below and add your commentary as needed. Personally I’d like a simple additional boolean input into creation nodes that defaults to True (Enable Element Binding) but gives us the option to input False (Disable Element Binding).

Hi Ben,
I totally

agree with the need for a simple node based on a boolean True/False which either releases the elements to be under Revit Control or keeps them under dynamo control.

In our simple case, we want to try out different spacings of purlins up a slope until we get something which seems right and then run the script to release the elements from Dynamo to be under Revit Control. WE then want to repeat the process for the other sloping roof.

I will upload a revit file and the dynamo script (as requested by Jacob) we have working and will also look into the member creation in a Python node as you have suggested
Regards
James

As a new user I can only upload one file at a time and so need a further reply first

Try another file sharing service if it doesn’t go through.

Hi Jacob,

This is the current status of the Dynamo script file where we are trying to introduce the python node to create the objects and release them using ToDSType(True).
Inserting Purlins using Roof 2Faces-v2.dyn (61.3 KB)

As you can see the Python node is failing due to expecting an XYZ and getting a line however in the Visual Studio, the API documentaion indicates the Create.NewFamilyInstance should accept (curve, symbol, level, structuralType)

The Revit file is simple it is just a pitched roof and we select the underside surface of each slope in turn.

Dynamo_Add Purlins to Roof Face.rvt (1.9 MB)

I have been trusted to upload now so here is the Revit file!!

1 Like