Так стирается С помощью диалогового окна:
Public Sub main()
Dim m_pApp As Application
Set m_pApp = Application
Dim pGxObjectFilter As IGxObjectFilter
Set pGxObjectFilter = New GxFilterShapefiles
Dim pGxObject As IGxObject
Dim pEnumGxObject As IEnumGxObject
Dim pGxDialog As IGxDialog
Set pGxDialog = New GxDialog
pGxDialog.Title = "Chooose a directory:"
Set pGxDialog.ObjectFilter = pGxObjectFilter
Dim anythingSelected As Boolean
anythingSelected = pGxDialog.DoModalOpen(m_pApp.hWnd, pEnumGxObject)
If anythingSelected Then
Set pGxObject = pEnumGxObject.Next
Else
MsgBox "Cancel"
Exit Sub
End If
Dim pGxObjectEdit As IGxObjectEdit
Set pGxObjectEdit = pGxObject
Call pGxObjectEdit.Delete
MsgBox "Delete Successful"
End Sub
********************************************
А так стирается БЕЗ помощи диалогового окна:
Public Sub main()
Set m_pApp = Application
Dim pFWsFact As IWorkspaceFactory
Set pFWsFact = New ShapefileWorkspaceFactory
Dim pFeatWS As IFeatureWorkspace
Set pFeatWS = pFWsFact.OpenFromFile("D:\temp", 0)
Dim pFC As IFeatureClass
Set pFC = pFeatWS.OpenFeatureClass("acopy")
Dim pDataset As IDataset
Set pDataset = pFC
Call pDataset.Delete
End Sub