AE中获得datalayer(featurelayer,tin.raster)所对应的data的文件路径和文件名

代码如下,只要是datalayer就行,featurelayer、tin、raster等都可以获得 

 ”’ <summary>
  ”’ 获得datalayer所对应的文件路径
  ”’ </summary>
  ”’ <param name=”pDataLayer”>图层</param>
  ”’ <param name=”pFilePath”>文件路径</param>
  ”’ <param name=”pFileName”>文件名</param> 
  ”’ <remarks></remarks>
  Public Sub GetDataLayerPath(ByVal pDataLayer As IDataLayer, ByRef pFilePath As String, ByRef pFileName As String)
    Dim pDatasetName As IDatasetName
    Dim pWSName As IWorkspaceName

    pDatasetName = pDataLayer.DataSourceName
    pWSName = pDatasetName.WorkspaceName
    pFilePath = pWSName.PathName
    pFileName = pDatasetName.Name
  End Sub

转载自:https://blog.csdn.net/xue12300/article/details/4378730

You may also like...