Import elevation data in the form of pipeline profile represented by a CAD polyline

Recently I was tasked with a water supply project involving some water hammer calculations and had some trouble building the model.

I have the plane layout of the pipeline and the elevation data in the form of  pipeline profile represented by a CAD polyline, as shown in the images below. Please note the numerical values are not organized in a chart so I can't just pull it out of the DXF file.

plane layout

pipeline profile

I can use the ModelBuilder to import the plane layout of the pipeline, but I can't find a way to import the elevation data. It seems the TRex tool does not recognize data in such form, so is there some other way to do this?

Looking forward to your help, thank you!