# Add a point to a layer

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
    new_pt = vulcan.polyline([[76600.0, 4500.0, 0.0]])  # create an object
    layer.append(new_pt)  # put new object into the layer

    layer.set_object(1, new_pt)  # assign object to index 0
    
    dgd.save_layer(layer)  # save layer