# Filename: pl_num_points.py
# Purpose: Get the number of points from a polyline.
# Returns: Integer.

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:
    num_points = obj.num_points() # get the number of points
    
    # do something with the results...
    print(f"{num_points}")

    