Hi @kmarkopouliotis
One way you can do it is via the function segment_get_point()
// Get details of the first point of the first segment
entity tp = entity('toolpath', 'mytp')
int segment_id = 0
int point_id = 0
object ptdata = segment_get_point(tp, segment_id, point_id)
// Round the z coord to 2 decimal places, to match the output in the
// Reorder form. ptdata is a map, one of whose elements is an array
// with the xyz of the point.
real z_coord = ptdata['position'][2]
real rounded_z = round(z_coord, 2)
Another way is to obtain values directly from the form:
// Get the string in the first row and second column of the
// Toolpath Reorder form, which should be raised before values
// are obtained (the indices start from zero).
FORM TPLIST
string entry = list_cell_value('TPList.TPListView', 0, 1)
// This returns a string in the form "10, 20, 30". So, split the
// string.
string delim = ','
string list coords = tokens(entry, delim)
// This gives a list, whose 3rd element is the z-coord
real zval = coords[2]
print par $zval
Lokesh Kalia
Senior Manager, Software Development