ArcGIS for Desktop

  • Documentación
  • Precios
  • Soporte

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS for Desktop

Un completo SIG profesional

ArcGIS for Server

SIG en tu empresa

ArcGIS for Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Precios
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

Help

  • Inicio
  • Introducción
  • Mapa
  • Analizar
  • Administrar datos
  • Herramientas
  • Más...

ListSubtypes

  • Resumen
  • Sintaxis
  • Ejemplo de código

Resumen

Returns a dictionary of the subtypes for a table or feature class.

Sintaxis

ListSubtypes (table)
ParámetroExplicaciónTipo de datos
table

The geodatabase table or feature class.

String

Valor de retorno

Tipo de datosExplicación
Dictionary

Returns a dictionary of subtype properties. The keys of the dictionary are the subtype codes, and the values of the dictionary are the subtype properties.

Ejemplo de código

ListSubtypes example 1

List all the subtypes for a feature class and print out the properties for each one.

import arcpy

subtypes = arcpy.da.ListSubtypes('C:/data/Boston.gdb/Boundary')

for stcode, stdict in list(subtypes.items()):
    print('Code: {0}'.format(stcode))
    for stkey in list(stdict.keys()):
        if stkey == 'FieldValues':
            print('Fields:')
            fields = stdict[stkey]
            for field, fieldvals in list(fields.items()):
                print(' --Field name: {0}'.format(field))
                print(' --Field default value: {0}'.format(fieldvals[0]))
                if not fieldvals[1] is None:
                    print(' --Domain name: {0}'.format(fieldvals[1].name))
        else:                    
            print('{0}: {1}'.format(stkey, stdict[stkey]))

Temas relacionados

  • Un recorrido rápido por los subtipos
¿Algún comentario sobre este tema?

ArcGIS for Desktop

  • Inicio
  • Documentación
  • Precios
  • Soporte

Plataforma ArcGIS

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

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog interno
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacidad | Legal