How create a detail line or reference plane in the section view following the topography profile

I need the script to select the dashed lines, then select the topography and create a profile as described in arrow 2.

dyna topography.dyn (60.9 KB)

my goal is to be able to host the level at the point as the circle