In my Mechanical Model I have two Remote Points named 'Remote Point 1' and 'Remote Point 2'. I've assigned a 'Pilot Node APDL Name' from the Details of each object, so that they can be referenced as 'rp_1' and 'rp_2' respectively:
To get the original distance between the two Remote Points, you can use the following script:
my_distnd_pre = DISTND(rp_1, rp_2) my_dist_pre = SQRT( (NX(rp_2)-NX(rp_1))**2 + (NY(rp_2)-NY(rp_1))**2 + (NZ(rp_2)-NZ(rp_1))**2 )
The snippet takes advantage of some "get functions" (DISTND, NX, NY, NZ) to retrieve the results and calculate the distance using simple math operations.
Similarly, for the results in post, the same equation should be applied taking into account the distance that each node has been displaced. The new equation would be:
my_dist_post = SQRT(((NX(rp_2)+UX(rp_2)) - (NX(rp_1)+UX(rp_1)))**2 + ((NY(rp_2)+UY(rp_2)) - (NY(rp_1)+UY(rp_1)))**2 + ((NZ(rp_2)+UZ(rp_2)) - (NZ(rp_1)+UZ(rp_1)))**2)