Align Profile with sweep path

Hi All,

I am trying to rotate align my profile with the direction of sweep path. I am able to move it to the path, however it doesn’t seem to be aligning with it
image
the result I want is in red
image

I have looked at coordinate systems/planes/transforming but not having any luck.

Is anyone able to point me in the right direction?

I have attached the dynamo file and revit file.

Thanks,

Brent

Project1.rvt (2.8 MB)
Guardrail.dyn (62.1 KB)

Maybe this helps

Hi, hope this helpsGuardrailRE.dyn (133.1 KB)

Thanks @Faruk_B. I wasn’t able to open the file… Said it was corrupted.
image
Is there any other way of getting that through?

The file is likely from a newer version (2.x) of Dynamo.
What version of Revit do you use?

hi, sorry I am using newer Dynamo version. I have placed screenshot that shows all changes I made to file, hope it can help

Thanks for that. One quick question…
image
I can’t seem to find the relay. Which addin package was that from?

Relay is from archilab package but it can be also avoided. It is used only to tie bunch of wires and to make script less messy