移除子类型 (数据管理)

摘要

使用子类型编码从输入表中移除子类型。

使用情况

  • 子类型可使用其整数编码进行移除。

  • 您也可在子类型视图中查看和管理子类型,此视图可通过单击数据功能区设计部分的子类型按钮或字段视图功能区中的子类型按钮打开。

参数

标注说明数据类型
输入表

包含子类型定义的要素类或表。

Table View
子类型编码

从输入表或要素类中移除子类型的子类型编码。

String

派生输出

标注说明数据类型
更新的输入表

已更新的表或要素类。

表视图

arcpy.management.RemoveSubtype(in_table, subtype_code)
名称说明数据类型
in_table

包含子类型定义的要素类或表。

Table View
subtype_code
[subtype_code,...]

从输入表或要素类中移除子类型的子类型编码。

String

派生输出

名称说明数据类型
out_table

已更新的表或要素类。

表视图

代码示例

RemoveSubtype 示例(Python 窗口)

以下 Python 窗口脚本演示了如何在即时模式下使用 RemoveSubtype 函数。

import arcpy
arcpy.env.workspace =  "C:/data/Montgomery.gdb"
arcpy.RemoveSubtype_management ("water/fittings", ["4","7"])
RemoveSubtype 示例 2(独立脚本)

以下独立脚本演示了如何将 RemoveSubtype 函数用作从子类型定义中移除子类型的工作流的一部分。

#Name: RemoveSubtype.py
# Purpose: Remove subtypes from a subtype definition
# Import system modules
import arcpy
 
# Set the workspace (to avoid having to type in the full path to the data every time)
arcpy.env.workspace =  "C:/data/Montgomery.gdb"
  
# Set local parameters
inFeatures = "water/fittings"
stypeList = ["5", "6", "7"]
 
# Process: Remove Subtype Codes...
arcpy.RemoveSubtype_management(inFeatures, stypeList)

环境

特殊情况

许可信息

  • Basic: 是
  • Standard: 是
  • Advanced: 是

相关主题