# Filename: point_x.py
# Purpose: Get x,y,z values for location clicked on the screen.
# Returns: Double.

from maptek import vulcan_gui

# select object from the screen
pick1 = vulcan_gui.pick_point() # creates a point object
pick1.set_single_point() # set property to select only one point
pt1 = pick1.pick('Click any location on the screen.') # pick the point

'''
The function pick() returns a tuple, therefore to use a point that has been
selected you must extract the point element from the tuple by index.
Example: pt1[0]
'''

# to get x,y,z value:
ptx = pt1[0].x
pty = pt1[0].y
ptz = pt1[0].z
print(ptx, pty, ptz)