Sweep Profile along a path

I have been trying to sweep a rectangle along curves modelled from an imported CAD drawing in Revit. But it seems I am missing on something in the script. I have the CAD

and dynamo script attached.

Easements 2.dwg (928.6 KB)

Sweep along Curve.dyn (29.0 KB)

Hi Enji, welcome :wave:
Sweeping a curve along a path is relative to the path itself, having a rectangle at 0,0,0 and rotating it is distinct to all the paths. Use the Curve.PlaneAtParameter node to get the context plane for the profile from the path, create the profile and sweep away. Please note when providing sample files check them before uploading, you were missing a rotation axis and the selected layers were not in the .dwg

Thank you, Mike. How do I bake it into Revit, so that it doesn’t disappear once I close Dynamo?

you’ve created Dynamo geometry.

Now you need to turn it into Revit elements using nodes such as Directshape.ByGeometry, FamilyInstance.ByGeometry or ImportInstance.ByGeometry

Browse through the forum- you’ll find loads of examples