Retrieving Point Coordinate and Converting to Single String

Let P1(Point)
Let XL(Length)
Let YL(Length)
Let ZL(Length)

Let XR(Real)
Let YR(Real)
Let ZR(Real)

Let XS(String)
Let YS(String)
Let ZS(String)

Let XYZ(String)


P1=`Geometrical Set.2\SelPT`


XL =P1->coord(1)
YL =P1->coord(2)
ZL =P1->coord(3)
' --- ※Point >coord (rank: Integer): Length
' --- ※Returns the coordinates of a point. Returns X if 1 is specified, Y if 2 is specified, Z if 3 is specified.

XR=int(XL/1mm)
YR=int(YL/1mm)
ZR=int(ZL/1mm)

XS=ToString(XR)
YS=ToString(YR)
ZS=ToString(ZR)

XYZ=XS+", "+YS+", "+ZS
`Geometrical Set.2\ResultString` =XYZ