using XYZ = Autodesk.Revit.Geometry.XYZ; using LINE = Autodesk.Revit.Geometry.Line; UIAPPLICATION app = m_doc.Application; //declare variables double x1 = (5.0); double y1 = (5.0); double z = (0.0); double x2 = (7.0); double y2 = (5.0); //create object XYZ point1 = app.Application.Create.NewXYZ(x1, y1, z); //takes doubles XYZ point2 = app.Application.Create.NewXYZ(x2, y2, z); //Create Line LINE line = app.Application.Create.NewLineBound(point1, point2);