# Framework for creating a layer

from maptek import vulcan

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

with vulcan.dgd(dgd_file, "w") as dgd:                  # 1. open the database in write mode
    layer = vulcan.layer('POINT')                       # 2. make a new layer
    new_pt = vulcan.polyline([[76500.0, 4500.0, 0.0]])  # 3. create an object
    layer.append(new_pt)                                # 4. put new object into the layer
    dgd.save_layer(layer)                               # 5. save layer