Build coverage topology in ArcMap using VBA

Last Published: April 25, 2020


This sample VBA code builds coverage topology.


  1. Use an ArcInfoWorkspaceFactory object to open the coverage's workspace.

    '++ Create a pointer to the data's workspace:
    Dim pWorkspaceFact As IWorkspaceFactory
    Set pWorkspaceFact = New ArcInfoWorkspaceFactory
    Dim pWorkspace As IWorkspace
    Set pWorkspace = pWorkspaceFact.OpenFromFile("c:\geodata\covers", 0)
    Dim pFeatureWorkspace As IFeatureWorkspace
    Set pFeatureWorkspace = pWorkspace

  2. Open the coverage as a Dataset object.

    Dim pDataset As IFeatureDataset
    Set pDataset = pFeatureWorkspace.OpenFeatureDataset("covername")

  3. Use the ICoverage:Build method to build the coverage.

    Dim pCoverage As ICoverage
    Set pCoverage = pDataset 'QI for ICoverage from IDataset
    Dim ptype As esriCoverageFeatureClassType
    ptype = esriCFCTPolygon
    pCoverage.Build ptype, "polygon"

    For more information, see the Coverage Specific Interfaces on the Geodatabase Object Model (Supplemental).

Article ID:000002411

  • ArcMap 8 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic