ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Remove Subtype

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Removes a subtype from the input table using its code.

Usage

  • Subtypes are removed using their integer code.

  • The subtypes of a feature class or table can also be managed in ArcCatalog. Subtypes can be created and modified using the Subtypes Property page on the dataset's Properties dialog box.

  • The Subtype Code parameter's Add Value button is used only in ModelBuilder. In ModelBuilder, where the preceding tool has not been run, or its derived data does not exist, the Subtype Code parameter may not be populated with values. The Add Value button allows you to add expected value(s) so you can complete the Remove Subtype dialog box and continue to build your model.

Syntax

RemoveSubtype_management (in_table, subtype_code)
ParameterExplanationData Type
in_table

The feature class or table containing the subtype definition.

Table View
subtype_code
[subtype_code,...]

The code used to remove a subtype from the input table or feature class.

String

Code sample

Remove Subtype Example (Python Window)

The following Python window script demonstrates how to use the RemoveSubtype function in immediate mode.

import arcpy
arcpy.env.workspace =  "C:/data/Montgomery.gdb"
arcpy.RemoveSubtype_management ("water/fittings", ["4","7"])
Remove Subtype Example 2 (Stand-alone Script)

The following stand-alone script demonstrates how to use the RemoveSubtype function as part of a workflow to remove subtypes from a subtype definition.

#Name: RemoveSubtype.py
# Purpose: Remove subtypes from a subtype definition

# Import system modules
import arcpy
 
try:
    # 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)
 
except Exception as err:
    print(err.args[0])

Environments

  • Auto Commit
  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: Yes
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Subtypes toolset
  • Geoprocessing considerations for subtypes
  • Geoprocessing workflow for subtypes
  • Working with subtypes

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

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

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal