Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

Test if IName Object is a Shapefile

$
0
0
Hello,

ArcCatalog saves Objects as an IName Object in the Clipboard.

I want to test an Object if it is a Shapefile, a Table from a Geodatabase or a dBase-Table.
Code:

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

It works, but it is not good enough. It could be any type of Table or Feature-Class.
Any idea how to test if the Object is exactly a Shapefile or dBase?

Thanks

Viewing all articles
Browse latest Browse all 1374

Trending Articles