# Add attributes to triangulation.

from maptek import vulcan

input_tri = "pit_solid.00t"  # triangulation to use
input_attributes = [['grade','10.33','Double'],
                    ['oxd','waste','String'],
                    ['int',23,'Integer'],
                    ['flagged',1,'Boolean']]

tri = vulcan.tri_attributes(input_tri)

assert tri.is_ok(), 'Error: Triangulation not open.  No attributes added.'
for attribute in input_attributes:
    attr = tri.put(*attribute)
    if attr:
        print(f"{attribute} successfully added.")
    else:
        print(f"{attribute} was not added.")