I am trying to access the DataType property of a Layer in the TOC in ArcMap. The layer is added from a web service as an IMapServerRESTLayer. The Data Type property is listed with Layer > Properties > source as in the following screen shot.
The map layer has a Type Of ICompositeLayer. It is a basemap.
Things I've tried. It cannot be cast as a IFeatureLayer. I have looked at the Carto Object Model Diagram, and cannot find a DataLayer property on anything except IMobileLayerInfo. and a similar ServiceDataType on IImageServerLayer. Tried making interface casts toward these objects but failed. Looked at using IComProperty Sheets ... managed to create an unpopulated version but think this not the way to go.
I am programming in VB.Net (but can read C#) in ArcGIS 10.2 using VS2010
Any ideas?
أكثر...

The map layer has a Type Of ICompositeLayer. It is a basemap.
Things I've tried. It cannot be cast as a IFeatureLayer. I have looked at the Carto Object Model Diagram, and cannot find a DataLayer property on anything except IMobileLayerInfo. and a similar ServiceDataType on IImageServerLayer. Tried making interface casts toward these objects but failed. Looked at using IComProperty Sheets ... managed to create an unpopulated version but think this not the way to go.
I am programming in VB.Net (but can read C#) in ArcGIS 10.2 using VS2010
Any ideas?
أكثر...