ListContingentValues
Краткая информация
В функции ListContingentValues доступен список зависимых значений в таблице. Возвращаемый список может быть ограничен с помощью критериев поиска для имени группы полей и подтипа.
Синтаксис
ListContingentValues(table, {field_group_name}, {subtype_code})
| Параметр | Объяснение | Тип данных |
|---|---|---|
|
table |
A table that has contingent values. |
String |
|
field_group_name |
The field group name to limit the results returned. Only contingent values for the field group specified will be returned. (Значение по умолчанию — All) |
String |
|
subtype_code |
The subtype code to limit the results returned. Only contingent values for the subtype specified will be returned. (Значение по умолчанию — All) |
Long |
Возвращаемое значение
| Тип данных | Объяснение |
|---|---|
|
Object |
Список объектов |
Пример кода
Перечислите и опишите свойства зависимых значений для группы полей с именем MyFieldGroup.
import arcpy
CVs = arcpy.da.ListContingentValues("C:\\MyProject\\myConn.sde\\mygdb.USER1.myFC", "MyFieldGroup")
for cv in CVs:
print("Subtype: {}\nIs retired: {}\nContingent Value Id: {}\nValues: \n".format(cv.subtype, cv.isRetired, cv.id))
for v in cv.values:
print(" Field Name: {}\n Field Value Type: {}""".format(v.name, v.type))
if v.type == "CODED_VALUE":
print(" Field Value Code: {}\n".format(v.code))
if v.type == "RANGE":
print(" Field Range: {}\n".format(v.range))