<?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 Layers and Tables From Feature Service in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770157#M654</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will try this next! Thanks Joshua!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Mar 2017 20:38:37 GMT</pubDate>
    <dc:creator>ZacharyNeumann1</dc:creator>
    <dc:date>2017-03-06T20:38:37Z</dc:date>
    <item>
      <title>Delete Layers and Tables From Feature Service (Feature Layer Collection)</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770154#M651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I created a new feature service (Feature Layer Collection) into a folder. It is an empty feature service with layers and table relationships. Each layer has a geometry type. I only want points. How can I delete the line and polygon layers and tables using the ArcGIS API for python? I will continue to read documentation and if I figure it out I will post back here.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="335242" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/335242_pastedImage_1.png" style="width: 620px; height: 373px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:17:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770154#M651</guid>
      <dc:creator>ZacharyNeumann1</dc:creator>
      <dc:date>2017-03-06T20:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Layers and Tables From Feature Service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770155#M652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Retrieve the item either by searching or using its unique identifier, and then use the &lt;A href="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.html?highlight=delete#arcgis.gis.Item.delete"&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;arcgis.gis.Item.delete()&lt;/SPAN&gt;&lt;/A&gt; method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770155#M652</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-03-06T20:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Layers and Tables From Feature Service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770156#M653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reporting back:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;from arcgis.features import FeatureLayerCollection&lt;BR /&gt;fs_url = 'URL HERE'&lt;BR /&gt;comments = FeatureLayerCollection(fs_url, gis=gis)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;layers = comments.layers&lt;BR /&gt;tables = comments.tables&lt;BR /&gt;for layer in layers:&lt;BR /&gt; print(layer)&lt;BR /&gt;for table in tables:&lt;BR /&gt; print(table)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Output will return each layer and table object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tried&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;del layers[1]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but object does not support item deletion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:34:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770156#M653</guid>
      <dc:creator>ZacharyNeumann1</dc:creator>
      <dc:date>2017-03-06T20:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Layers and Tables From Feature Service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770157#M654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will try this next! Thanks Joshua!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:38:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770157#M654</guid>
      <dc:creator>ZacharyNeumann1</dc:creator>
      <dc:date>2017-03-06T20:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Layers and Tables From Feature Service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770158#M655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This makes sense for deleting the feature service completely, but as for deleting its layers or tables it doesn't make sense to me. I can access the object (see comment below this one) but if I use the delete method on the object I get&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN class="" style="color: darkgreen;"&gt;&lt;SPAN class="" style="color: darkred;"&gt;AttributeError&lt;/SPAN&gt;: 'FeatureLayer' object has no attribute 'delete'&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;/PRE&gt;&lt;P&gt;If I ask for the object's id I get 1, which is local to the feature service itself.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:44:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770158#M655</guid>
      <dc:creator>ZacharyNeumann1</dc:creator>
      <dc:date>2017-03-06T20:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Layers and Tables From Feature Service</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770159#M656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I guess what I mean by feature service is that it's a feature layer collection.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770159#M656</guid>
      <dc:creator>ZacharyNeumann1</dc:creator>
      <dc:date>2017-03-06T20:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Delete Layers and Tables From Feature Service (Feature Layer Collection)</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770160#M657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I can use the &lt;CODE class="" style="color: #000000; background: transparent; border: none; font-weight: bold;"&gt;delete_from_definition&lt;/CODE&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;(&lt;/SPAN&gt;&lt;EM style="color: #555555; font-weight: bold;"&gt;json_dict&lt;/EM&gt;&lt;SPAN class="" style="color: #555555; font-weight: bold;"&gt;) &lt;/SPAN&gt;method listed here&amp;nbsp;&lt;A class="link-titled" href="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.managers.html#featurelayercollectionmanager" title="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.managers.html#featurelayercollectionmanager"&gt;arcgis.features.managers module — arcgis 1.0.1 documentation&lt;/A&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just need to figure out how to use it properly...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Mar 2017 17:49:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/delete-layers-and-tables-from-feature-service/m-p/770160#M657</guid>
      <dc:creator>ZacharyNeumann1</dc:creator>
      <dc:date>2017-03-07T17:49:06Z</dc:date>
    </item>
  </channel>
</rss>

