ArcGIS Desktop

  • Dokumentation
  • Support

  • My Profile
  • Hilfe
  • Sign Out
ArcGIS Desktop

ArcGIS Online

Die Mapping-Plattform für Ihre Organisation

ArcGIS Desktop

Ein vollständiges professionelles GIS

ArcGIS Enterprise

GIS in Ihrem Unternehmen

ArcGIS for Developers

Werkzeuge zum Erstellen standortbezogener Apps

ArcGIS Solutions

Kostenlose Karten- und App-Vorlagen für Ihre Branche

ArcGIS Marketplace

Rufen Sie Apps und Daten für Ihre Organisation ab.

  • Dokumentation
  • Support
Esri
  • Anmelden
user
  • Eigenes Profil
  • Abmelden

ArcMap

  • Startseite
  • Erste Schritte
  • Karte
  • Analysieren
  • Verwalten von Daten
  • Werkzeuge
  • Erweiterungen

ListSubtypes

  • Zusammenfassung
  • Syntax
  • Codebeispiel

Zusammenfassung

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

Syntax

ListSubtypes (table)
ParameterErläuterungDatentyp
table

The geodatabase table or feature class.

String

Rückgabewert

DatentypErläuterung
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.

Codebeispiel

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]))

Verwandte Themen

  • Kurzer Überblick über Subtypes

ArcGIS Desktop

  • Startseite
  • Dokumentation
  • Support

ArcGIS Plattform

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

Über Esri

  • Über uns
  • Karriere
  • Insider-Blog
  • User Conference
  • Developer Summit
Esri
Wir sind an Ihrer Meinung interessiert.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Datenschutz | Rechtliches