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


IDataSourceHelperMapDocument.ReplaceWorkspaceName Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > ID > IDataSourceHelperMapDocument Interface > IDataSourceHelperMapDocument.ReplaceWorkspaceName Method
ArcGIS Developer Help

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 bool

Product Availability

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

See Also

IDataSourceHelperMapDocument Interface