ArcGIS Desktop

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

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

ArcGIS Online

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

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

ArcMap

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

CreateScratchName

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

サマリー

Creates a unique scratch path name for the specified data type. If no workspace is given the current workspace is used.

構文

CreateScratchName ({prefix}, {suffix}, {data_type}, {workspace})
パラメーター説明データ タイプ
prefix

The prefix that is added to the scratchname. By default, a prefix of xx is used.

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

String
suffix

The suffix added to the scratchname. This can be an empty double-quoted string.

String
data_type

The data type which will be used to create the scratchname. Valid datatypes are:

  • Coverage —Only valid Coverage names are returned.
  • Dataset —Only valid Dataset names are returned.
  • FeatureClass —Only valid FeatureClass names are returned.
  • FeatureDataset —Only valid FeatureDataset names are returned.
  • Folder —Only valid Folder names are returned.
  • Geodataset —Only valid Geodataset names are returned.
  • GeometricNetwork —Only valid Geometric Network names are returned.
  • ArcInfoTable —Only valid ArcInfo Table names are returned.
  • NetworkDataset —Only valid Network Dataset names are returned.
  • RasterBand —Only valid Raster Band names are returned.
  • RasterCatalog —Only valid Raster Catalog names are returned.
  • RasterDataset —Only valid Raster Dataset names are returned.
  • Shapefile —Only valid Shapefile names are returned.
  • Terrain —Only valid Terrain names are returned.
  • Workspace —Only valid Workspace scratchnames are returned.
String
workspace

The workspace used to determine the scratch name to be created. If not specified, the current workspace is used.

String

戻り値

データ タイプ説明
String

The unique scratch path name.

コードのサンプル

CreateScratchName example

Create a unique scratch name for the derived output of the Buffer tool. This scratch name is then used as input to the Clip tool.

import arcpy

# Set workspace
#
arcpy.env.workspace = "C:/Data/Municipal.gdb"

# Create a scratch name for the Buffer tool output.
#   The scratch name created will be include 'temp0.shp',
#   If temp0.shp already exists, the number will be incremented
#   until the name is unique in the workspace.
#
scratch_name = arcpy.CreateScratchName("temp",
                                       data_type="Shapefile",
                                       workspace=arcpy.env.scratchFolder)

# Execute Buffer tool, using scratch name for output
#
arcpy.Buffer_analysis("Roads", scratch_name, "1000 feet")

# Execute Clip tool, using scratch name for input
#
arcpy.Clip_analysis(scratch_name, "CityBoundary", "CityRoads")

# Delete scratch dataset
arcpy.Delete_management(scratch_name)

関連トピック

  • CreateUniqueName

ArcGIS Desktop

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

ArcGIS プラットフォーム

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

Esri について

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