Finding ways to compute the height from 2 3d line from dwg

Hi All,

This is Jasper. Nice to meet you guys~!

Currently I have a difficulties making use of dynamo to compute the height from 2 3d line from dwg by sorting out the z value from exclude.

I am curious if there any way to do so?

After that I am going to set pararmeter of a family like pile with computed height.

Thanks so much for helps!!

Capture