EdgeArrayArray Class


An array of edge arrays.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)

Syntax

C#
public class EdgeArrayArray : APIObject, 
	IEnumerable
Visual Basic
Public Class EdgeArrayArray _
	Inherits APIObject _
	Implements IEnumerable
Visual C++
public ref class EdgeArrayArray : public APIObject, 
	IEnumerable

Examples

Copy C#
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);
                        }
                    }
                }
            }
        }
    }
}
Copy VB.NET
Public Sub GetEdgeArrayArray(app As Autodesk.Revit.ApplicationServices.Application, element As Autodesk.Revit.DB.Element)
    ' Get geometry element of the selected element
    Dim geoOptions As Options = app.Create.NewGeometryOptions()
    Dim geoElement As Autodesk.Revit.DB.GeometryElement = element.Geometry(geoOptions)
    ' Get geometry object
    For Each o As GeometryObject In geoElement
        Dim solid As Solid = TryCast(o, Solid)
        If solid IsNot Nothing Then
            For Each face As Face In solid.Faces
                If face IsNot Nothing Then
                    Dim edgeArrays As EdgeArrayArray = face.EdgeLoops
                    For Each edges As EdgeArray In edgeArrays
                        For Each edge As Edge In edges
                            ' Get one test point
                            Dim testPoint As XYZ = edge.Evaluate(0.5)
                            Dim edgeInfo As String = String.Format("Point on edge: ({0},{1},{2})", testPoint.X, testPoint.Y, testPoint.Z)
                            TaskDialog.Show("Revit", edgeInfo)
                        Next
                    Next
                End If
            Next
        End If
    Next
End Sub

Inheritance Hierarchy

System Object
Autodesk.Revit.DB APIObject
Autodesk.Revit.DB EdgeArrayArray

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →