Placing a Top Track on Walls

Im trying to make a script that will place a top track on all walls for coordination. But im getting this error from set parameter by name. The script works on the test file i made but it doesnt work on a real project.
HERE IS THE DYN AND RFA
Top Track.dyn (34.0 KB)
Top Track.rfa (400 KB)

WORKING TEST FILE: (the red is the Top Track)

GRAPH: