# Filename: pl_get_linetype.py
# Purpose: Gets the linetype indices as a list [style, thickness].
# Returns: Int list.

from maptek import vulcan_gui

# use dynamic selection to select correct object
sel = vulcan_gui.selection("Select layer object.")
sel.criteria = ["LINE", "POLYGON"]  # limit selection to a polyline object
sel.single_object = True  # prevents selection prompt from asking more than once

for obj in sel:
    obj_name = obj.get_name()  # get name of object
    ltype = obj.get_linetype()  # get the linetype indices of each object
            
    print(f"{obj_name} pattern index: {ltype}")







