Currently in modelbuilder you can Add fields (multiple), but you cannot Add Coded Values to Domains (multiple). You have to add domain values one tool module at a time, which is time consuming.
Create an Add Coded Values to Domains (multiple) tool which allows the user to Paste In multiple formatted domain values, using a json dictionary. This way the user can format the multiple values in excel and paste it into the tool, not type them into individual fields.
Thanks for this Idea @MarissaMijal,
It doesn't satisfy your request directly, but using the Table to Domain GP tool may help you here depending on how your domains are being generated.
Consider writing your domains to a memory table and passing that to the Table to Domain tool all at once. Here's a bit of sample code that might help. If you have an existing Excel table, you could also use Excel to Table to get the table directly from your Excel file. These are python examples below but these tools are also available in Model Builder.
Example pulling directly from an Excel Workbook
xlsx = <path_to_excel_workbook>
workspace = <path_to_workspace>
tbl = arcpy.conversion.ExcelToTable(
xlsx,
'memory\domain_tbl',
'Sheet1'
)
arcpy.management.TableToDomain(
in_table = tbl,
code_field = 'code',
description_field = 'description',
in_workspace = wksp
domain_name = 'xlsx_domain'
)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.