Community
Hi Guys,
i want to retrieve the Lines contour of an Area Boundary Element and i'm stuck
actually i do not know how to iterate the result coming from Area.GetBoundarySegments()
thanks in advance
Moshe
namespace MyNameSpace { [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.ReadOnly)] public class Class1 : IExternalCommand { public Autodesk.Revit.UI.Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { try { Document document = commandData.Application.ActiveUIDocument.Document; AreaFilter filter = new AreaFilter(); FilteredElementCollector collector = new FilteredElementCollector(document, document.ActiveView.Id); IList<Element> elementAreas = collector.WherePasses(filter).WhereElementIsNotElementType().ToElements(); IList<IList<BoundarySegment>> boundarySegments; foreach (Element elem in elementAreas) { Area ba = elem as Area; boundarySegments = ba.GetBoundarySegments(new SpatialElementBoundaryOptions()); // stuck here ??? } } catch (Exception e) { message = "Unexpected Exception thrown."; return Autodesk.Revit.UI.Result.Failed; } return Autodesk.Revit.UI.Result.Succeeded; } } }
Solved! Go to Solution.
Solved by jeremytammik. Go to Solution.
my pleasure entirely 🙂
Can't find what you're looking for? Ask the community or share your knowledge.