Structural Foundation - Coordinates

Hi

I have a script for getting the cooridnates for structural foundations. I use it for getting the XYZ of piles to create a pile schedule for the Easting, Northing & Cut off of the piles.

I have just tried to use it for the first time in '26 and its coming up with an error of
“asked to convert non convertible types”.

I have double checked and it works in '24 fine.

Can anyone suggest a solution? I am gazumped!

I have just tried it with a totall fresh model in '26 and it works fine. So something a miss in my other model.

I shall do some more research!