FamilyInstance.ByLine not offsetting element in the Z Axis

I’m a beginner to dynamo and am trying to write a script that will add a clearance family on top of the cable tray for a selected level. I’m able to extract the X, Y, and Z coordinates for the straight sections of the cable tray. I can get it to insert the specified family but its not offsetting the family in the Z. Any guidance or direction would be appreciated.

why don’t you use beam by curve to place your family instaed of generic model category ?

I have made some progress once I switched to an adaptive component family. Now how to control the starting and ending size of a form? I can get the starting end to flex in size but the end doesn’t follow.

make sure that when you select the adaptive points inside your family that you make the below option:

image