Create Detail Line

doc   = __revit__.ActiveUIDocument.Document
uidoc = __revit__.ActiveUIDocument
active_view  = doc.ActiveView

#ARGUMENTS
pt_start = XYZ(20,0,0)
pt_end   = XYZ(20,5,0)
curve    = Line.CreateBound(pt_start, pt_end)

#CREATE DETAIL LINE
detail_line = doc.Create.NewDetailCurve(active_view, curve)

⌨️ Happy Coding!
Erik Frits