123456789101112131415161718192021222324252627282930313233 |
- 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<DetailCurve> NewDetailCurve(this View view,CurveArray curves,
- Color color ,int lineWeight)
- {
- var listLines = view.Document.Create.NewDetailCurveArray(view, curves).OfType<DetailCurve>().ToList();
- foreach (var detailCurve in listLines)
- {
- if (detailCurve == null)
- continue;
- detailCurve.SetLineStyle(color, lineWeight,null);
- }
- return listLines;
- }
- }
- }
|