# Find an object from a layer by name.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database to access
layer_name = 'POINT'  # layer to use

with vulcan.dgd(dgd_file, "w") as dgd:  # open up the database in write mode
    layer = dgd.get_layer(layer_name)  # access layer

    # find the object by index
    obj = layer.get_object(0)

    # do something with the object
    obj.colour = 5

    # put object back into layer and save
    layer.append(obj)
    dgd.save_layer(layer)