# Filename: pl_linetype.py
# Purpose: Polyline linetype.
# Returns: Point.

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
    
    # get linetype property from selected object
    ltype = obj.linetype   
    print(f"{obj_name}: {ltype}")

    # assign linetype property to selected object 
    obj.linetype = [0,1]  # [style, thickness]
    sel.replace(obj)  # replaces the old object and preserves changes