Select to view content in your preferred language

Model Builder how generate a choice list from the Coded Value Domains

82
0
3 weeks ago
Labels (1)
PaolaBonato
New Contributor

Good Morning,

I'm trying to create a model builder that generates a choice list in the dialog from the codeds of a geodatabase domain value (in ArcMap 10.8).

I found this blog and I tryed different solutions:

1) generating the choice list from "Properties > Parameters" it works but if a coded value is added, I need to manually add the new value to the list

2) creating a table from the domain using "Domain to table" tool, then following the step in "Generating a choice list from an input feature class/table automatically" section of the blog. The model works if I first create the table from the domain and then execute the model for the list. However, when I try to combine both steps into one model I get the follow error:

ERROR
updateParameters Execution Error: Runtime error Traceback (most recent call last): File "C:\Users\...\Toolbox.tbx#DropDownList.UpdateParameters.py", line 4, in File "C:\...\Toolbox.tbx#DropDownList.UpdateParameters.py", line 29, in updateParameters File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\__init__.py", line 1187, in SearchCursor return gp.searchCursor(dataset, where_clause, spatial_reference, fields, sort_fields) File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\geoprocessing\_base.py", line 361, in searchCursor self._gp.SearchCursor(*gp_fixargs(args, True))) IOError: "%Input_GDB%\_sys" does not exist Click error and warning icons for more information Close Window

updateParameters Execution Error: Runtime error
Traceback (most recent call last):
File "C:\Users\...\Toolbox.tbx#DropDownList.UpdateParameters.py", line 4, in <module>
File "C:\Users\..\Toolbox.tbx#DropDownList.UpdateParameters.py", line 29, in updateParameters
File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\__init__.py", line 1187, in SearchCursor
return gp.searchCursor(dataset, where_clause, spatial_reference, fields, sort_fields)
File "c:\program files (x86)\arcgis\desktop10.8\arcpy\arcpy\geoprocessing\_base.py", line 361, in searchCursor
self._gp.SearchCursor(*gp_fixargs(args, True)))
IOError: "%Input_GDB%\_sys" does not exist
create_domain.pngcreate list.pngcombine.pngerror.png

 

 

 

 

 

 

 

 

 

 

 

Do you have any idea how to resolve the error or have another solution?

Thanks

0 Kudos
0 Replies