This runs in a node (from Revit > Script > Python ).
elevations = [0, 3000, 6000] # in project units names = ["L1", "L2", "L3"] dynamo for revit 2019
for i, elev in enumerate(elevations): try: level = Level.Create(doc, elev) level.Name = names[i] except: pass This runs in a node (from Revit > Script > Python )
import clr clr.AddReference('RevitServices') from RevitServices.Persistence import DocumentManager doc = DocumentManager.Instance.CurrentDBDocument Python ). elevations = [0