Spot Coordinates Scheduling For Piles Using Dynamo ( Error )

I’m not familiar with creating dynamo scripts but with a little research, I’ve created the shown script in the attached picture. This script has worked for one of my Revit models giving accurate shared coordinates according to survey point. however, I had wrong coordinates with the other models !

Could you help me know what’s the wrong with this script ?

Use “Convert Point in Coordinate Systems” from GeniusLoci Package.

I am looking for this concept. Script has to be update automatically XYZ coordinates in schedule. please let me know.