# Filename: pl_is_clockwise.py
# Purpose: Checks if the polyline is clockwise.
# Returns: Bool.

from maptek import vulcan_gui

# use dynamic selection to select correct line object
sel = vulcan_gui.selection("Select layer object to connect points.")
sel.criteria = ["LINE", "POLYGON"]  # limit selection to a polyline object

for obj in sel:
    obj_name = obj.get_name()  # get name of object
    clockwise = obj.is_clockwise()  # check if clockwise

    print(f"{obj_name} clockwise: {clockwise}")