[Revit API] How to add Symbolic lines into shaft openning?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hello everyone!!
I have the code below to create the shaft opening . but I don't know how to add symbolic lines .
uiapp = commandData.Application;
uidoc = uiapp.ActiveUIDocument;
doc = uidoc.Document;
var filter = new FilteredElementCollector(doc).OfClass(typeof(Level)).OfCategory(BuiltInCategory.OST_Levels).Cast<Level>().ToList();
CurveArray curveArray = new CurveArray();
Line l1 = Line.CreateBound(XYZ.Zero, new XYZ(1,0,0));
Line l2 = Line.CreateBound(new XYZ(1, 0, 0), new XYZ(1, 1, 0));
Line l3 = Line.CreateBound(new XYZ(1, 1, 0), new XYZ(0, 1, 0));
Line l4 = Line.CreateBound(new XYZ(0, 1, 0), XYZ.Zero);
curveArray.Append(l1);
curveArray.Append(l2);
curveArray.Append(l3);
curveArray.Append(l4);
using (Transaction tr= new Transaction(doc))
{
tr.Start("strat");
Opening opening = doc.Create.NewOpening(filter[0], filter[1], curveArray);
tr.Commit();
}
Picture(description)
Hope someone can guide me on this!!
Thanks all!!
Link copied