ArcGIS for Desktop

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

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

ArcGIS Online

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

ArcGIS for Desktop

完全なプロ仕様の GIS

ArcGIS for Server

エンタープライズ GIS

ArcGIS for Developers

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

ArcGIS Solutions

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

ArcGIS Marketplace

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

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

Help

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

ListDataFrames

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

サマリ

Returns a Python list of DataFrame objects that exist within a single map document (.mxd).

説明

ListDataFrames always returns a Python list object even if only one data frame is returned. In order to return a DataFrame object, an index value must be used on the list (e.g., df = arcpy.mapping.ListDataFrames(mxd)[0]). For loops on a list provide an easy mechanism to iterate through each item in a list (e.g., for df in arcpy.mapping.ListDataFrames(mxd):).

Wildcards are not case sensitive. A wildcard string of "la*" will return a data frame with a name Layers.

It is possible that there might be data frames in a map document that have the same name. If that is the case, then other properties may need to be used to isolate a specific data frame. Properties such as a data frame's credits or description could be used to do this. It is ideal that all data frames be uniquely named.

構文

ListDataFrames (map_document, {wildcard})
パラメータ説明データ タイプ
map_document

A variable that references a MapDocument object.

MapDocument
wildcard

A combination of asterisks (*) and characters can be used to help limit the results.

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

String

戻り値

データ タイプ説明
DataFrame

A Python list of DataFrame objects.

コードのサンプル

DataFrame example:

This script will search for a data frame with the name Transportation and set the scale and rotation to the appropriate values.

import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
for df in arcpy.mapping.ListDataFrames(mxd, "t*"):
    if df.name.lower == "transportation":
        df.scale = 24000
        df.rotation = 5.5
mxd.saveACopy(r"C:\Project\Project2.mxd")
del mxd
このトピックへのフィードバック

ArcGIS for Desktop

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

ArcGIS プラットフォーム

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

Esri について

  • 会社概要
  • 採用情報
  • スタッフ ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | プライバシー | リーガル