Get xyz coordinates of Beams and columns

Hi

i have seen a dynamo script for getting start and end coordinates of Structural beams. But unfortunately its not working with me. Actually the encircled portion lacing is not clear.