How to calculate the path of an object

Thanks, I got it to work.