Examples
public void GetEdgeArrayArray(Autodesk.Revit.ApplicationServices.Application app, Autodesk.Revit.DB.Element element)
{
// Get geometry element of the selected element
Options geoOptions = app.Create.NewGeometryOptions();
Autodesk.Revit.DB.GeometryElement geoElement = element.get_Geometry(geoOptions);
// Get geometry object
foreach (GeometryObject o in geoElement)
{
Solid solid = o as Solid;
if (null != solid)
{
foreach (Face face in solid.Faces)
{
if (face != null)
{
EdgeArrayArray edgeArrays = face.EdgeLoops;
foreach (EdgeArray edges in edgeArrays)
{
foreach (Edge edge in edges)
{
// Get one test point
XYZ testPoint = edge.Evaluate(0.5);
string edgeInfo = string.Format("Point on edge: ({0},{1},{2})", testPoint.X, testPoint.Y, testPoint.Z);
TaskDialog.Show("Revit",edgeInfo);
}
}
}
}
}
}
}