<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>idea Allow Add coded values to domain tool to use dictionary in modelbuilder in ModelBuilder Ideas</title>
    <link>https://community.esri.com/t5/modelbuilder-ideas/allow-add-coded-values-to-domain-tool-to-use/idi-p/922535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently in modelbuilder you can Add fields (multiple), but you cannot Add Coded Values to Domains (multiple).&amp;nbsp; You have to add domain values one tool module at a time, which is time consuming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Create an &lt;EM&gt;Add Coded Values to Domains (multiple)&lt;/EM&gt; tool which allows the user to &lt;STRONG&gt;Paste In&lt;/STRONG&gt;&amp;nbsp;multiple formatted domain values, using a json dictionary.&amp;nbsp; This way the user can format the multiple values in excel and paste it into the tool, not type them into individual fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jan 2020 20:19:31 GMT</pubDate>
    <dc:creator>MarissaMijal</dc:creator>
    <dc:date>2020-01-24T20:19:31Z</dc:date>
    <item>
      <title>Allow Add coded values to domain tool to use dictionary in modelbuilder</title>
      <link>https://community.esri.com/t5/modelbuilder-ideas/allow-add-coded-values-to-domain-tool-to-use/idi-p/922535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently in modelbuilder you can Add fields (multiple), but you cannot Add Coded Values to Domains (multiple).&amp;nbsp; You have to add domain values one tool module at a time, which is time consuming.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Create an &lt;EM&gt;Add Coded Values to Domains (multiple)&lt;/EM&gt; tool which allows the user to &lt;STRONG&gt;Paste In&lt;/STRONG&gt;&amp;nbsp;multiple formatted domain values, using a json dictionary.&amp;nbsp; This way the user can format the multiple values in excel and paste it into the tool, not type them into individual fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jan 2020 20:19:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-ideas/allow-add-coded-values-to-domain-tool-to-use/idi-p/922535</guid>
      <dc:creator>MarissaMijal</dc:creator>
      <dc:date>2020-01-24T20:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Allow Add coded values to domain tool to use dictionary in modelbuilder</title>
      <link>https://community.esri.com/t5/modelbuilder-ideas/allow-add-coded-values-to-domain-tool-to-use/idc-p/1602172#M243</link>
      <description>&lt;P&gt;Thanks for this Idea&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/88340"&gt;@MarissaMijal&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;It doesn't satisfy your request directly, but using the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/table-to-domain.htm" target="_blank" rel="noopener"&gt;Table to Domain GP tool&lt;/A&gt;&amp;nbsp; may help you here depending on how your domains are being generated.&lt;BR /&gt;&lt;BR /&gt;Consider writing your domains to a memory table and passing that to the Table to Domain tool all at once.&amp;nbsp; &amp;nbsp;Here's a bit of sample code that might help.&amp;nbsp; If you have an existing Excel table, you could also use &lt;A href="https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/excel-to-table.htm" target="_blank" rel="noopener"&gt;Excel to Table&lt;/A&gt; to get the table directly from your Excel file.&amp;nbsp; These are python examples below but these tools are also available in Model Builder.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Example pulling directly from an Excel Workbook&lt;/P&gt;&lt;LI-CODE lang="python"&gt;xlsx = &amp;lt;path_to_excel_workbook&amp;gt;
workspace = &amp;lt;path_to_workspace&amp;gt;

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'
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Apr 2025 02:13:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-ideas/allow-add-coded-values-to-domain-tool-to-use/idc-p/1602172#M243</guid>
      <dc:creator>SSWoodward</dc:creator>
      <dc:date>2025-04-03T02:13:02Z</dc:date>
    </item>
  </channel>
</rss>

