ListWorkspaces method |
|
Release 9.1
Last modified August 19, 2005 |
Print all topics in : "Properties and Methods" |
Lists all workspaces within the selected workspace. Specifying search conditions (wildcard) and a workspace type will limit the results. The workspace must be specified before using any of the List methods, except ListFields and ListIndexes.
Part | Description |
object | The instantiated geoprocessing object |
wild card | Optional. Combination of * and characters that will help limit the results. The asterisk (*) is the same as saying ALL. If no wildcard is specified, then all workspaces will be returned. |
WorkspaceType | Optional. Keyword WorkspaceType that will limit the returned workspaces. Valid WorkspaceTypes for this method are:
|
from win32com.client import Dispatch gp = Dispatch("esriGeoprocessing.GpDispatch.1") gp.workspace = "c:\\county" # List all access workspaces in the current workspace workspaces = gp.listworkspaces("*", "access") workspace = workspaces.next() while workspace: # Compact each geodatabase gp.compact(workspace) workspace = workspaces.next()