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

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

リスト ツール、ツールボックス、および環境設定

ArcPy では、使用可能なツールボックスに応じて数個のツールボックス、数十もの環境設定、数百ものツールにアクセスできます。 ArcPy には、ツール、環境設定、またはツールボックスを返す関数があり、それぞれ ListTools、ListEnvironments、ListToolboxes と適切に名付けられています。

それぞれの関数にはワイルド カード オプションがあり、これを使用することで名前の文字列が返され、ループすることができます。 以下の例では、使用可能なツールへのアクセス方法と、その用途を出力する方法を示します。

import arcpy

# Create a list of the conversion tools
tools = arcpy.ListTools("*_conversion")

# Loop through the list and print each tool's usage
for tool in tools:
    print(arcpy.Usage(tool))

以下の例では、Python で環境設定を表示する方法を示します。

import arcpy

environments = arcpy.ListEnvironments()

# Sort the environment list, disregarding capitalization
environments.sort(key=str.lower)

for environment in environments:
    # As the environment is passed as a variable, use Python's getattr to 
    # evaluate the environment's value
    env_value = getattr(arcpy.env, environment)

    # Format and print each environment and its current setting
    print("{0:<30}: {1}".format(environment, env_value))

以下の例では、現在のツールボックスを Python で表示する方法を示します。

import arcpy 

# Print all current toolboxes
for toolbox in arcpy.ListToolboxes():
    # Toolboxes are printed in the form of "toolbox_name(toolbox_alias)"
    print(toolbox)

関連トピック

  • データのリストの作成

ArcGIS Desktop

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

ArcGIS

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

Esri について

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