表视图属性

AllSource 1.3    |

摘要

Describe 函数将返回表视图的以下属性。 还支持属性组。

对于表视图,Describe dataType 属性将返回 "TableView" 的值。

属性

属性说明数据类型
table
(只读)

与表视图相关联的表的 Describe 对象。

Describe
FIDSet
(只读)

arcpy.Describe 将返回用分号分隔的所选记录 ID 字符串(记录编号)。

arcpy.da.Describe 将返回所选记录 ID 的列表。 如果未选择记录,则 FIDSet 将返回 None;如果未选择内容,则 FIDSet 将返回空列表。

String
fieldInfo
(只读)

表的 FieldInfo 对象(属性集)。

FieldInfo
whereClause
(只读)

表视图选择 where 子句。

String
nameString
(只读)

表视图的名称。

String

代码示例

表视图属性示例

以下独立脚本可从要素类中创建内存型表视图。 随后将显示表视图的部分属性。

import arcpy

# Create a table view from a feature class
#
arcpy.MakeTableView_management(
        "C:/data/wellingham.gdb/water/water_pipes", 
        "pipes_view")

# Create a Describe object from the table view
#
desc = arcpy.Describe("pipes_view")

# Print some table view properties
#
print("Table View Name: " + desc.nameString)
print("Where Clause:    " + desc.whereClause)
print("Table Name:      " + desc.name)

在本主题中