Gets the objectId collection of all surface objects in the drawing.

Namespace: Autodesk.Civil.ApplicationServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.4.2516.0

Syntax

C#
public ObjectIdCollection GetSurfaceIds()
Visual Basic
Public Function GetSurfaceIds As ObjectIdCollection
Visual C++
public:
ObjectIdCollection^ GetSurfaceIds()

Remarks

OBJECTID TYPE:Autodesk.Civil.DatabaseServices.Surface.

Examples

CopyC#
 1[CommandMethod("GetAllSurfaces")]
 2public void GetAllSurfaces()
 3{
 4    using (Transaction ts = Application.DocumentManager.MdiActiveDocument.Database.TransactionManager.StartTransaction())
 5    {
 6        ObjectIdCollection SurfaceIds = doc.GetSurfaceIds();
 7        foreach (ObjectId surfaceId in SurfaceIds)
 8        {
 9            CivSurface oSurface = surfaceId.GetObject(OpenMode.ForRead) as CivSurface;
10            editor.WriteMessage("Surface: {0} \n  Type: {1}", oSurface.Name, oSurface.GetType().ToString());
11        }
12    }
13}

See Also