Trying to add a vertical pipe at the end point of another pipe

Hello I am trying to add a vertical pipe of unit length (1ft) in revit at the endpoint of another pipe. That is sloped. But I dont know how to tell dynamo which endpoint I want it to place the pipe. Or how to tell it to be vertical. Can anyone help me?