ArcFM Solution Developer Guide
GetWorkspace Method (IMMWorkspaceManager)






Allows a propertyset to be passed in using IPropertySet

Allows options to be passed in using the mmWorkspaceOptions enumeration; options passed as Long

In ArcCatalog, this method returns the selected workspace. In ArcMap, it creates a list of workspaces from all the feature layers present in ArcMap.
Syntax
'Declaration
 
Function GetWorkspace( _
   ByVal pPS As ESRI.ArcGIS.esriSystem.IPropertySet, _
   ByVal Options As System.Integer _
) As ESRI.ArcGIS.Geodatabase.IWorkspace
'Usage
 
Dim instance As IMMWorkspaceManager
Dim pPS As ESRI.ArcGIS.esriSystem.IPropertySet
Dim Options As System.Integer
Dim value As ESRI.ArcGIS.Geodatabase.IWorkspace
 
value = instance.GetWorkspace(pPS, Options)
ESRI.ArcGIS.Geodatabase.IWorkspace GetWorkspace( 
   ESRI.ArcGIS.esriSystem.IPropertySet pPS,
   System.int Options
)
function GetWorkspace( 
    pPS: ESRI.ArcGIS.esriSystem.IPropertySet;
    Options: System.Integer
): ESRI.ArcGIS.Geodatabase.IWorkspace; 
function GetWorkspace( 
   pPS : ESRI.ArcGIS.esriSystem.IPropertySet,
   Options : System.int
) : ESRI.ArcGIS.Geodatabase.IWorkspace;
ESRI.ArcGIS.Geodatabase.IWorkspace* GetWorkspace( 
   ESRI.ArcGIS.esriSystem.IPropertySet* pPS,
   System.int Options
) 
ESRI.ArcGIS.Geodatabase.IWorkspace^ GetWorkspace( 
   ESRI.ArcGIS.esriSystem.IPropertySet^ pPS,
   System.int Options
) 

Parameters

pPS
Allows a propertyset to be passed in using IPropertySet
Options

Allows options to be passed in using the mmWorkspaceOptions enumeration; options passed as Long

Return Value

IWorkspace
Example
The follow code sample passes in a null pointer as the propertyset and the required options. This code sample displays the path to the geodatabase if the user is using a personal geodatabase in ArcMap.
Visual Basic Copy Code
Private Sub TestWkspMan()
  Dim pWkspMan As IMMWorkspaceManager
  Set pWkspMan = New mmWorkspaceManager
  Dim pWKsp As IWorkspace
  Set pWKsp = pWkspMan.GetWorkspace(Nothing, mmWSOInteractive + mmWSOIncludeLogin)
  MsgBox pWKsp.PathName
End Sub
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

IMMWorkspaceManager Interface
IMMWorkspaceManager Members

Send Feedback