# Add attributes to triangulation.

from maptek import vulcan

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

with vulcan.tri_attributes(input_tri) as 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.")