# Filename: pl_get_coordinates.py
# Purpose: Get a list of coordinates of the points from a polyline.
# Returns: List.

from maptek import vulcan_gui

# select layer from the screen
sel = vulcan_gui.selection("Select Object")  # prompt for selection
sel.criteria = ["LINE", "POLYGON"]  # limit selection to a line
sel.single_object = True  # prevents selection prompt from asking more than once

for obj in sel:
    coords = obj.get_coordinates() # get [x,y,z] coordinates from selected object
    
    # do something with results...
    for points in coords:
        print(f"{points}")

