Macro to Copy X/Y coordinates to a text file

  •  The code will copy the X/Y coordinates of a circle or point to a text file.

     written by prl
'Program: savepointstotext.d3m
'saves coordinates
'DC version 14 and up

a$=sys$(0)
if a$="" then input "File name for saving data points", a$
a$=a$+".dat"

precision 15
open "o", 1, a$ 'open file to place input in

exitflag = 0
Do While exitflag = 0
setpoint "Set a point to save to file, press enter to exit loop", 1
if sys(1)= 0 then exit do
pointval x1 y1 z1 1
print #1, x1,y1,z1
sys(1)=0
loop
close 1

message "The points have been saved to the file ", a$
end

File to Download:

savepointstotext.zip