Beginner: Creating a solid with a polycurve and sweep

I am trying to learn this software with minimal background during my down time at work. I was given a task to create a polygonal donut, that is fully adjustable, but it has to be with a sweep type function.

I have the polycurve I want to sweep and the path, but if I use sweep the orientation of the polycurve doesn’t change when it goes past a corner. I saw somewhere, that I might be able to use a “Curve.CoordinateSystemAtParameter” followed by “Geometry.Transform” then “Solid.ByLoft” and that would do essentially the same thing, but I just can’t seem to follow the logic and get it to work. I am open to new ideas (especially easier ones). But if someone can explain how to do this or show an example I would appreciate it greatly.

Thanks

Can you show the graph? It is working for me

the error has now change to say “Warning: Solid.BySweep operation failed. Unable to update solid by sweep : SWEEP_BAD_CLOSURE – Cannot make sweep closure for closed path”

Thanks

So something I learned while I was doing that is that when you are using a closed polycurve as the path, the start point of the polycurve has to be within the profile.

In my example, I have 5 points for the polycurve path with the first one being dead center inside the profile.

I appreciate the help!

Still getting the same error

same error? if im not mistaken, your path should be in your profile. from the picture it doesnt seem like it