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

  • 主页
  • 入门
  • 地图
  • 分析
  • 管理数据
  • 工具
  • 扩展模块

关系类属性

  • 描述
  • 属性
  • 代码示例

描述

Describe 函数可返回关系类的以下属性。同时还支持 GDB 表属性、表属性和数据集属性。

了解有关关系类属性的详细信息

关系类可返回 "RelationshipClass" 的 dataType。

属性

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

关系类的后向路径标注。

String
cardinality
(只读)

关系类的基数。

  • OneToOne
  • OneToMany
  • ManyToMany
String
classKey
(只读)

关系类的类键。

  • Undefined
  • ClassID
  • ClassCode
String
destinationClassKeys
(只读)

包含对象关键名称和关键角色的元组列表(DestinationPrimary、DestinationForeign)。

tuple
destinationClassNames
(只读)

包含各目标类名称的列表。

String
forwardPathLabel
(只读)

关系类的前向路径标注。

String
isAttachmentRelationship
(只读)

指示关系类是否体现表附件。

Boolean
isAttributed
(只读)

指示此关系类中的关系是否含有属性。

Boolean
isComposite
(只读)

指示关系类是否表示复合关系,即源对象类表示复合对象。

Boolean
isReflexive
(只读)

指示源集与目标集是否相交。

Boolean
keyType
(只读)

关系类的键类型。

  • Single
  • Dual
String
notification
(只读)

关系类的通知方向。

  • None
  • Forward
  • Backward
  • Both
String
originClassNames
(只读)

包含各源类名称的列表。

String
originClassKeys
(只读)

包含对象关键名称和关键角色的元组列表(OriginPrimary、OriginForeign)。

tuple
relationshipRules
(只读)

适用于此关系类的关系规则。

Object

代码示例

关系类属性示例(独立脚本)

以下独立脚本显示关系类的属性。

import arcpy

# Create a Describe object
#
desc = arcpy.Describe("C:/data/moad.gdb/West/bapCompAttRel")

# Print relationship class properties
#
print "%-25s %s" % ("Backward Path Label:", desc.backwardPathLabel)
print "%-25s %s" % ("Cardinality:", desc.cardinality)
print "%-25s %s" % ("Class key:", desc.classKey)
print "%-25s %s" % ("Destination Class Names:", desc.destinationClassNames)
print "%-25s %s" % ("Forward Path Label:", desc.forwardPathLabel) 
print "%-25s %s" % ("Is Attributed:", desc.isAttributed)
print "%-25s %s" % ("Is Composite:", desc.isComposite) 
print "%-25s %s" % ("Is Reflexive:", desc.isReflexive)
print "%-25s %s" % ("Key Type:", desc.keyType)
print "%-25s %s" % ("Notification Direction:", desc.notification)
print "%-25s %s" % ("Origin Class Names:", desc.originClassNames)

ArcGIS Desktop

  • 主页
  • 文档
  • 支持

ArcGIS

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

关于 Esri

  • 关于我们
  • 招贤纳士
  • Esri 博客
  • 用户大会
  • 开发者峰会
Esri
分享您的想法。
Copyright © 2021 Esri. | 隐私政策 | 法律声明