<?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>topic Re: Create Locator in Model Builder with Custom Style in Spatial Data Science Questions</title>
    <link>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180994#M467</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done... glad you worked this out for sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Oct 2016 19:21:11 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-10-26T19:21:11Z</dc:date>
    <item>
      <title>Create Locator in Model Builder with Custom Style</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180990#M463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When one uses the Create Address Locator tool in model builder, and then exports the model to a .py script, the&amp;nbsp; line of the script that does the actual creation starts with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;arcpy.CreateAddressLocator_geocoding("US Address - Dual Ranges", etc etc etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example I used the out of the box ESRI locator style.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How does model builder / arcpy know what locator style to use?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ask because I’m trying to build a model / .py script that uses a custom locator style and when I do, it errors out with a &amp;nbsp;&lt;STRONG&gt;00042 error: Failed to create the address locator.&lt;/STRONG&gt; I can run the Create Locator tool and the custom style and mapping the appropriate fields without any problem: in model builder it bails out.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Error 00042 provides the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 18.0pt;"&gt;Description&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;The address locator cannot be created.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 18.0pt;"&gt;Solution&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Check that you have the following: &lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Permission to write to the disk or database &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Enough disk space for the address locator you are trying to create &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Valid network or database connection &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Valid geocoding rule files &lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 12.0pt;"&gt;Valid address locator style &lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The description is pretty obvious, but the solution isn’t.&amp;nbsp; The first three items I have covered.&amp;nbsp; But the rules and style validity have me stymied.&amp;nbsp; How can I convince the model builder and subsequently arcpy that what I’m providing is valid?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 17:11:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180990#M463</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2016-10-25T17:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Create Locator in Model Builder with Custom Style</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180991#M464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Joe... What is this stuff in&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/geocoding-toolbox/create-address-locator.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/geocoding-toolbox/create-address-locator.htm"&gt;Create Address Locator—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;about not storing locators in geodatabases anymore (aka 10.4 is the last version that supports this). &amp;nbsp;Does that imply that you can save to disk and get something you can read?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 21:13:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180991#M464</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-25T21:13:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create Locator in Model Builder with Custom Style</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180992#M465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't stored locators within a geodatabase for several years now Dan. &amp;nbsp;Used to all the time but got talked out of it in a discussion on the old forum in the 9.1 or .3 days. &amp;nbsp;I always create a directory called.... Locators to store them. &amp;nbsp;The ones I'm dealing with now are on the 'C' drive of a virtual machine, at least that's just what the vm thinks: &amp;nbsp;everything is on the SAN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Strange thing about this problem is everything checks out and seems like it should work. &amp;nbsp;I can run the tool manually in the same workspace, run it in &amp;nbsp;a model with an out of the box ESRI locator with the same data, no problem. Finally heard back from the developer and he says it should work. &amp;nbsp;Yeah. &amp;nbsp;It should, but it dosen't for now....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 02:59:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180992#M465</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2016-10-26T02:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create Locator in Model Builder with Custom Style</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180993#M466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to get resolution to my problem, so I'll post it here for future generations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apparently the create locator tool has an issue (I hasten to use the word bug) when it's used in a model.&amp;nbsp; Anytime you have a primary data source that couples with an alternate names, you need to map the appropriate fields in each that contain the JOINID.&amp;nbsp; That's fine when you run the tool manually, mapping those fields are not a problem.&amp;nbsp; But....&amp;nbsp; When you use the tool in a model and subsequent python scripts, the setting is lost if you don't make sure it's saved.&amp;nbsp; Follow along the illustrations below as I'm a firm believer that a picture is worth a thousand words:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image" height="409" src="https://community.esri.com/legacyfs/online/252333_pastedImage_1.png" width="518" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you need to do to make sure this 'sticks' in the model is to apply it, and save your model.&amp;nbsp; Then, re-edit your model and double check; it should be empty, so map it again, apply it again, and save it again.&amp;nbsp; You should be good to go.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also learned a trick today that would saved me a ton of head and heartache.&amp;nbsp; Running a model from within model builder with the run arrow button will give you a better error description:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image" height="283" src="https://community.esri.com/legacyfs/online/252334_pastedImage_2.png" width="662" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When it hits the problem and quits, not only will you see notation of the 00042 error, but a much more verbose and useful sql error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/252338_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hey Dan;&amp;nbsp; I feel weird marking my own response to my own post as the correct answer...&amp;nbsp; Would you be so kind?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/people/Dan_Patterson"&gt;Dan_Patterson&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 19:01:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180993#M466</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2016-10-26T19:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create Locator in Model Builder with Custom Style</title>
      <link>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180994#M467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Done... glad you worked this out for sure&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 19:21:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/spatial-data-science-questions/create-locator-in-model-builder-with-custom-style/m-p/180994#M467</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-26T19:21:11Z</dc:date>
    </item>
  </channel>
</rss>

