CivilDocumentGetSurfaceIds Method

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

Namespace: Autodesk.Civil.ApplicationServices
Assembly: AeccDbMgd (in AeccDbMgd.dll) Version: 13.8.0.292
Syntax
public ObjectIdCollection GetSurfaceIds()

Return Value

ObjectIdCollection
Remarks
OBJECTID TYPE:Autodesk.Civil.DatabaseServices.Surface.
Example
C#
 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