# Get the name and description of each layer.

from maptek import vulcan

dgd_file = "pydemo.dgd.isis"  # design database to access

with vulcan.dgd(dgd_file, "r") as dgd:  # open up the database in read mode
    layer_list = dgd.list_layers()  # get the list of layers
    for i, layer in enumerate(layer_list):  # loop through layer_list with i as index
        new_layer = dgd.get_layer(layer_list[i])  # get a layer from the layer list

        # get layer name and description
        layer_name = new_layer.name
        layer_descr = new_layer.description

        print(f"layer name: {layer_name}   description: {layer_descr}")