Sub List_Source()
Dim mxDoc As IMxDocument
Dim pMap As iMap
Set mxDoc = ThisDocument
Set pMap = mxDoc.FocusMap
Dim pLayer As ILayer
Dim pDataLayer As IDataLayer2
Dim pftlayer As IFeatureLayer
For i = 0 To pMap.LayerCount - 1
Set pLayer = pMap.Layer(i)
If TypeOf pLayer Is IDataLayer Then
Set pDataLayer = pLayer
Dim pdataSrc As IDatasetName
Set pdataSrc = pDataLayer.DataSourceName
Debug.Print pLayer.Name & "," & pdataSrc.WorkspaceName.BrowseName & "," & pdataSrc.WorkspaceName.PathName & "," & pdataSrc.WorkspaceName.Type
'Debug.Print pDataLayer.DataSourceName
End If
Next
End Sub
Wednesday, July 16, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment