ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

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

ArcGIS Online

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

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

Help

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • その他...

SetProgressor

  • サマリー
  • 説明
  • 構文
  • コードのサンプル

サマリー

Establishes a progressor object which allows progress information to be passed to a progress dialog box. The appearance of the progress dialog box can be controlled by choosing either the default progressor or the step progressor.

説明

Since script tools share the application, you have control of the progress dialog box. You can control the appearance of the progress dialog box by choosing either the default progressor or the step progressor, as illustrated below.

Default and step progressor

構文

SetProgressor (type, {message}, {min_range}, {max_range}, {step_value})
パラメーター説明データ タイプ
type

The progressor type (default or step).

  • default —The progressor moves back and forth continuously.
  • step —The progressor shows the percentage complete.

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

String
message

The progressor label. The default is no label.

String
min_range

Starting value for progressor. Default is 0.

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

Integer
max_range

Ending value for progressor. Default is 100.

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

Integer
step_value

The progressor step interval for updating the progress bar.

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

Integer

コードのサンプル

SetProgressor example

Set progressor object for displaying progress in the progress dialog box.

import os
import arcpy

# Allow overwriting of output
arcpy.env.overwriteOutput = True

# Set current workspace
arcpy.env.workspace = "c:/data"

# Get a list of shapefiles in folder
fcs = arcpy.ListFeatureClasses()

# Find the total count of shapefiles in list
fc_count = len(fcs)

# Set the progressor
arcpy.SetProgressor("step", "Copying shapefiles to geodatabase...",
                    0, fc_count, 1)

# Create a file gdb to contain new feature classes
arcpy.CreateFileGDB_management(arcpy.env.workspace, "fgdb.gdb")

# For each shapefile, copy to a file geodatabase
for shp in fcs:
    # Trim the '.shp' extension
    fc = os.path.splitext(shp)[0]

    # Update the progressor label for current shapefile
    arcpy.SetProgressorLabel("Loading {0}...".format(shp))

    # Copy the data
    arcpy.CopyFeatures_management(shp, os.path.join("fgdb.gdb", fc))

    # Update the progressor position
    arcpy.SetProgressorPosition()

arcpy.ResetProgressor()

関連トピック

  • ResetProgressor
  • SetProgressorLabel
  • SetProgressorPosition
  • 進行状況ダイアログ ボックスの制御

ArcGIS Desktop

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

ArcGIS プラットフォーム

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

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