This document is archived and information here might be outdated.  Recommended version.


IDataSourceHelperMapDocument.ReplaceWorkspaceName Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Carto)  

IDataSourceHelperMapDocument.ReplaceWorkspaceName Method

Replaces all layers having matching workspace path names with the new workspace name object.

[Visual Basic .NET]
Public Sub ReplaceWorkspaceName ( _
    ByVal pMapDocument As IMapDocument, _
    ByVal pOldWorkspaceName As IWorkspaceName, _
    ByVal pNewWorkspaceName As IWorkspaceName, _
    ByVal validate As Boolean _
)
[C#]
public void ReplaceWorkspaceName (
    IMapDocument pMapDocument,
    IWorkspaceName pOldWorkspaceName,
    IWorkspaceName pNewWorkspaceName,
    bool validate
);
[C++]
HRESULT ReplaceWorkspaceName(
  IMapDocument* pMapDocument,
  IWorkspaceName* pOldWorkspaceName,
  IWorkspaceName* pNewWorkspaceName,
  VARIANT_BOOL validate
);
[C++]

Parameters pMapDocument [in]
pMapDocument is a parameter of type IMapDocument pOldWorkspaceName [in]
pOldWorkspaceName is a parameter of type IWorkspaceName pNewWorkspaceName [in]
pNewWorkspaceName is a parameter of type IWorkspaceName validate [in] validate is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also

IDataSourceHelperMapDocument Interface