NewAlignment Method for two Lines

Hi All,

I’ve got some problems with the application of NewAligment Method.
NewAlignment Method

For Faces, I can use face.Tags.LookupTag("RevitFaceReference") to find the corresponding Revit face reference. Is there any similar way to transfer lines to Revit line references?


I want to lock the two elements with the two lines, as shown above. I used ToRevitType() successfully transferring Dynamo lines to Revit lines. But got null when I tried to obtain the reference by Line.Reference. Could you please help me out if you have any clues?

Thanks a lot.
Kurt