using Autodesk.Revit.DB; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace FWindSoft.Revit { public static class DetailCurveExtension { public static DetailCurve NewDetailCurve(this View view ,Curve curve, Color color , int lineWeight) { DetailCurve result = view.Document.Create.NewDetailCurve(view, curve); result.SetLineStyle(color, lineWeight,null); return result; } public static List NewDetailCurve(this View view,CurveArray curves, Color color ,int lineWeight) { var listLines = view.Document.Create.NewDetailCurveArray(view, curves).OfType().ToList(); foreach (var detailCurve in listLines) { if (detailCurve == null) continue; detailCurve.SetLineStyle(color, lineWeight,null); } return listLines; } } }