Dim pObject As Object pObject = pName.Open 'PName is the IName-Object from Clipboard If TypeOf pObject Is IFeatureClass Then ... ElseIf TypeOf pObject Is ITable Then ... End If
If TypeOf pName Is IDatasetName Then Dim pDatasetName As IDatasetName pDatasetName = pName Dim pWorkspaceName As IWorkspaceName2 pWorkspaceName = pDatasetName.WorkspaceName If pDatasetName.Type = esriDatasetType.esriDTFeatureClass Then 'Shapefile? If pWorkspaceName.WorkspaceFactoryProgID.Contains("esriDataSourcesFile.ShapefileWorkspaceFactory") Then '... End If End If End If
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.