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

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

ListTableViews

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

概要

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

ディスカッション

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

Wildcards are used on the name property and are not case sensitive. A wildcard string of "so*" will return a layer with a name Soils. Wildcards can be skipped in the scripting syntax simply by passing an empty string (""), an asterisk (*), or entering wildcard=None, or nothing at all if it is the last optional parameter in the syntax.

It is possible that there might be tables 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 layer. Properties such as a tables's datasource or definitionQuery could be used to do this. It is ideal that all tables in a map document be uniquely named.

構文

ListTableViews (map_document, {wildcard}, {data_frame})
パラメーター説明データ タイプ
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
data_frame

A variable that references a DataFrame object.

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

DataFrame

戻り値

データ タイプ説明
TableView

A Python list of TableView objects.

コードのサンプル

ListTableViews example

The following script finds a table called TrafficAccidents in a data frame named Transportation and sets a definition query.

import arcpy
mxd = arcpy.mapping.MapDocument(r"c:\project\project.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Transportation")[0]
table = arcpy.mapping.ListTableViews(mxd, "TrafficAccidents", df)[0]
table.definitionQuery = "[Accidents] > 5"
mxd.save()
del mxd

ArcGIS Desktop

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

ArcGIS

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

Esri について

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