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 Integer _
) As ESRI.ArcGIS.Geodatabase.IWorkspace
'Usage
 
Dim instance As IMMWorkspaceManager
Dim pPS As ESRI.ArcGIS.esriSystem.IPropertySet
Dim Options As Integer
Dim value As ESRI.ArcGIS.Geodatabase.IWorkspace
 
value = instance.GetWorkspace(pPS, Options)
ESRI.ArcGIS.Geodatabase.IWorkspace GetWorkspace( 
   ESRI.ArcGIS.esriSystem.IPropertySet pPS,
   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 XP SP3 (32-bit and 64-bit), Windows 7 (32-bit and 64-bit)

Not all Operating Systems are supported on all products. Visit the ArcFM Solution Supported Versions page for full details.

See Also

Reference

IMMWorkspaceManager Interface
IMMWorkspaceManager Members

 

 


Send Comment