ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

ListWorkspaces

  • 概要
  • ディスカッション
  • 構文
  • コードのサンプル

概要

Returns a list of workspaces in the current workspace.

ディスカッション

The workspace environment must be set before using several of the list functions, including ListDatasets, ListFeatureClasses, ListFiles, ListRasters, ListTables, and ListWorkspaces.

構文

ListWorkspaces ({wild_card}, {workspace_type})
パラメーター説明データ タイプ
wild_card

Limits the results returned. If a value is not specified, all values are returned. The wildcard is not case sensitive.

SymbolDescriptionExample

*

Represents zero or more characters.

Te* finds Tennessee and Texas.

String
workspace_type

The workspace type that will limit the results returned. The following are valid workspace types:

  • Access —Only personal geodatabases will be selected.
  • Coverage —Only coverage workspaces will be selected.
  • FileGDB —Only file geodatabases will be selected.
  • Folder —Only shapefile workspaces will be selected.
  • SDE —Only enterprise databases will be selected.
  • All —All workspaces will be selected. This is the default.

(デフォルト値は次のとおりです All)

String

戻り値

データ タイプ説明
String

The list containing workspace names that is returned from the function, limited by the wild_card and workspace_type arguments.

コードのサンプル

ListWorkspaces example

Compact all file geodatabases in the workspace.

import arcpy

arcpy.env.workspace = "c:/data"

# List all file geodatabases in the current workspace
workspaces = arcpy.ListWorkspaces("*", "FileGDB")

for workspace in workspaces:
    # Compact each geodatabase
    arcpy.Compact_management(workspace)

関連トピック

  • データのリストの作成
  • Walk

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • Esri ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2021 Esri. | プライバシー | リーガル