Why not created curves by points?

Dear People,
I made simple logic for creating manhole and pipe.
Unfortunately, it’s not working well. I don’t know why.

Please anybody advise to me.
I uploaded my rvt, dyn and xlsx.

Drainage Network.rvt (6.5 MB)
Drainage_Manhole+Pipe.dyn (348.6 KB)
Drainage Template.xlsx (39.4 KB)