I am trying to get the "Catalog Path" of a Feature Layer's data source in the table of contents of ArcMap using ArcObjects. This is very straightforward in arcpy but seemingly not so much in ArcObjects.
In arcpy, the Layer.dataSource property returns the "Catalog Path" of the layer. For example, for an SDE feature class in a feature dataset, it returns something like:
The help says that the
dataSource property is just the
datasetName properties combined, but this is not exactly true. For one, the
workspacePath property expands the "Database Connections" shortcut, and secondly it does not include the feature dataset name. Thus
workspacePath returns something like:
c:\Documents and Settings\user\Application Data\ESRI\Desktop10.0\ArcCatalog\MyConnection.sde
Incidentally this is also the value returned by IWorkspaceName.PathName.
So is there an ArcObjects property that corresponds directly to the
Layer.dataSource property, or is additional logic needed to build the same "Catalog Path" from the available ArcObjects interfaces?