How Create Insulation Detail Lines by REVIT API ? (Insulation / annotation)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
GraphicsStyle solid_wt_6 = LinesCat.GetGraphicsStyle(GraphicsStyleType.Projection);
geomLine = Line.CreateBound(start, end);
Transaction transaction = new Transaction(document, "Detail Lines example");
if (transaction.Start() == TransactionStatus.Started)
{
DetailLine detailline = document.Create.NewDetailCurve(view, geomLine) as DetailLine;
detailline.LineStyle = solid_wt_6;
if (null == detailline)
{
throw new Exception("Create a new straight grid failed.");
}
transaction.Commit();
Curve curve = detailline.GeometryCurve as Curve;
}
How can I make it?
I wrote the code, but it didn't work. Which part is wrong?