Arrange Family at Polyline according to the Path with Rotation

Hello, I want to make family arranged horizontally to the polyline (consist of multiple lines and curves) according to the path with x distance (if possible, I want to change the point according to the chordline). I’ve tried using this script but only works on some line or curve, while the rotation seems off on other. Please help, thank you.

Can you post the .dyn file and show specifically what you expect the result to look like compared to how it is currently functioning?

You could try joining your curves into a single polycurve and work with that…

this is the file:
I expect the result will be like the picture above (left side)Capture

I’ve tried this, but it makes the script did’t work.