# Filename: tri_set_properties_colour.py
# Purpose: Set the colour properties of a triangulation.
# Returns: Void.

from maptek import vulcan

tri = 'topo.00t' # input triangulation

# property list
# USE_RGB: True = 1; False = 0
# USE_ICOLOUR: True = 1; False = 0
# ICOLOUR: Range = 0-255

with vulcan.triangulation(tri,'w') as tri: # Open triangulation in write mode
    props = tri.get_properties()
    props["USE_RGB"] = 0
    props["USE_ICOLOUR"] = 1
    props["ICOLOUR"] = 123
    tri.set_properties(props)