<?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: Delete locations (Stops and Barriers) using Model Builder/ Python in ArcGIS Network Analyst Questions</title>
    <link>https://community.esri.com/t5/arcgis-network-analyst-questions/delete-locations-stops-and-barriers-using-model/m-p/698021#M6736</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use Delete Features to delete all or a selection of locations, just as you would for a normal layer:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/delete-features.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/delete-features.htm"&gt;Delete Features—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The trick is how to access the sublayer (like Stops or Point Barriers). &amp;nbsp;In Model Builder, you can use the Select Data utility to grab the sublayer from the network analysis layer. &amp;nbsp;In python, the syntax depends on whether you're using ArcMap or Pro, but it involves doing listLayers on the network analysis layer object. &amp;nbsp;The last code sample on this page shows it being done (for ArcMap):&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/make-service-area-layer.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/make-service-area-layer.htm"&gt;Make Service Area Layer—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're going to add a completely different set of stops or barriers to your sublayers after deleting the existing locations, you actually don't need to do a delete step at all. &amp;nbsp;When you run Add Locations, just chose the option to clear existing data rather than append.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 May 2017 16:20:02 GMT</pubDate>
    <dc:creator>MelindaMorang</dc:creator>
    <dc:date>2017-05-23T16:20:02Z</dc:date>
    <item>
      <title>Delete locations (Stops and Barriers) using Model Builder/ Python</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/delete-locations-stops-and-barriers-using-model/m-p/698020#M6735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any way to delete locations (Stops and Barriers) using Model Builder/ Python from my analysis layer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 May 2017 19:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/delete-locations-stops-and-barriers-using-model/m-p/698020#M6735</guid>
      <dc:creator>MichałKałuski</dc:creator>
      <dc:date>2017-05-19T19:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Delete locations (Stops and Barriers) using Model Builder/ Python</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/delete-locations-stops-and-barriers-using-model/m-p/698021#M6736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use Delete Features to delete all or a selection of locations, just as you would for a normal layer:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/delete-features.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/delete-features.htm"&gt;Delete Features—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The trick is how to access the sublayer (like Stops or Point Barriers). &amp;nbsp;In Model Builder, you can use the Select Data utility to grab the sublayer from the network analysis layer. &amp;nbsp;In python, the syntax depends on whether you're using ArcMap or Pro, but it involves doing listLayers on the network analysis layer object. &amp;nbsp;The last code sample on this page shows it being done (for ArcMap):&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/make-service-area-layer.htm" title="http://desktop.arcgis.com/en/arcmap/latest/tools/network-analyst-toolbox/make-service-area-layer.htm"&gt;Make Service Area Layer—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you're going to add a completely different set of stops or barriers to your sublayers after deleting the existing locations, you actually don't need to do a delete step at all. &amp;nbsp;When you run Add Locations, just chose the option to clear existing data rather than append.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 May 2017 16:20:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/delete-locations-stops-and-barriers-using-model/m-p/698021#M6736</guid>
      <dc:creator>MelindaMorang</dc:creator>
      <dc:date>2017-05-23T16:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: Delete locations (Stops and Barriers) using Model Builder/ Python</title>
      <link>https://community.esri.com/t5/arcgis-network-analyst-questions/delete-locations-stops-and-barriers-using-model/m-p/698022#M6737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Melinda this is really helpful!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Aug 2020 17:15:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-network-analyst-questions/delete-locations-stops-and-barriers-using-model/m-p/698022#M6737</guid>
      <dc:creator>YICHAOJIA</dc:creator>
      <dc:date>2020-08-26T17:15:34Z</dc:date>
    </item>
  </channel>
</rss>

