Accessing Daylight Feature Lines

The AeccSite:FeatureLines property is a collection of grading feature lines in the drawing. This collection only contains the types of feature lines available through the Prospector on the AutoCAD Civil 3D user interface. The collection doesn’t contain daylight or projection feature lines. However, you can still get information about these types of feature lines programmatically by prompting the user to select feature line object in a drawing. This code sample prompts the user to select a feature line, and then prints out the number of points it contains:

Dim objPart As AeccLandFeatureLine
Dim objEnt As AcadObject
Dim objAcadEnt As AcadEntity
Dim varPick As Variant
ThisDrawing.Utility.GetEntity objEnt, varPick, "Select the polyline/feature line"
If TypeOf objEnt Is AeccLandFeatureLine Then
   Set objPart = objEnt
   Debug.Print TypeName(objPart)
   Dim varArray As Variant
   varArray = objPart.GetPoints()
   Debug.Print "Number of points = " & UBound(varArray)
ElseIf TypeOf objEnt Is AcadEntity Then
   Set objAcadEnt = objEnt
   Debug.Print TypeName(objAcadEnt)
   If (g_oAeccDoc.Sites.Count = 0) Then
      g_oAeccDoc.Sites.Add "TestSite"
   End If
   Set objPart = g_oAeccDoc.Sites(0).FeatureLines.AddFromPolyline(objAcadEnt.ObjectID, "Standard")
End If