<?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: Convert selected features to kml in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679652#M52679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Olinda,&lt;/P&gt;&lt;P&gt;Try this way: use Copy Features tool to copy your selected features into a temp feature class, then&amp;nbsp;Make&amp;nbsp;Feature Layer by the temp feature class, and then Layer To KML tool.&lt;/P&gt;&lt;P&gt;The Copy Features tool will pick up selected features only if the input is a layer and has a selection..&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="460663" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/460663_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Sep 2019 07:01:02 GMT</pubDate>
    <dc:creator>LeoLiu1</dc:creator>
    <dc:date>2019-09-27T07:01:02Z</dc:date>
    <item>
      <title>Convert selected features to kml</title>
      <link>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679651#M52678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May you please assist me with my model builder, so basically i have 15 layers and i would like to select layers by certain attributes&amp;nbsp; first and then convert the selected attributes to kml without having to export the selected features to a feature class. However i cannot get this to work as all the features are being converted to kml instead of the selected features only am i suppose to add some extra code or what.&lt;/P&gt;&lt;P&gt;i do not want to export the selected features as that would create a lot of layers and it will become messy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/460377_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2019 11:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679651#M52678</guid>
      <dc:creator>OlindaMombeyarara</dc:creator>
      <dc:date>2019-09-25T11:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert selected features to kml</title>
      <link>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679652#M52679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Olinda,&lt;/P&gt;&lt;P&gt;Try this way: use Copy Features tool to copy your selected features into a temp feature class, then&amp;nbsp;Make&amp;nbsp;Feature Layer by the temp feature class, and then Layer To KML tool.&lt;/P&gt;&lt;P&gt;The Copy Features tool will pick up selected features only if the input is a layer and has a selection..&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="460663" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/460663_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2019 07:01:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679652#M52679</guid>
      <dc:creator>LeoLiu1</dc:creator>
      <dc:date>2019-09-27T07:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: Convert selected features to kml</title>
      <link>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679653#M52680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much for your response, however i am not getting the kml file. For some reason its not being saved. please assist&lt;IMG alt="model image" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/460668_model9.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;# To allow overwriting the outputs change the overwrite option to true.&lt;BR /&gt;arcpy.env.overwriteOutput = False&lt;/P&gt;&lt;P&gt;# Local variables:&lt;BR /&gt;Residential__2_ = "Residential"&lt;BR /&gt;Residentialbyattribute = Residential__2_&lt;BR /&gt;Count = "7"&lt;BR /&gt;ResCopiedFeatures = r"C:\Users\SADV\Work\Esri Data\2018\SADV_Res_Coverage\SADV_Res_Coverage.gdb\ResCopiedFeatures"&lt;BR /&gt;ResCopiedFeatures_Layer = "ResCopiedFeatures_Layer"&lt;BR /&gt;residentialtest_kmz = r"C:\Users\SADV\Documents\ArcGIS\testing\residentialtest.kmz"&lt;/P&gt;&lt;P&gt;# Process: Select Layer By Attribute&lt;BR /&gt;arcpy.SelectLayerByAttribute_management(in_layer_or_view=Residential__2_, selection_type="NEW_SELECTION", where_clause="BuildStatus = 'In Progress' And Province = 'WC'", invert_where_clause="")&lt;/P&gt;&lt;P&gt;# Process: Copy Features&lt;BR /&gt;arcpy.CopyFeatures_management(in_features=Residentialbyattribute, out_feature_class=ResCopiedFeatures, config_keyword="", spatial_grid_1="", spatial_grid_2="", spatial_grid_3="")&lt;/P&gt;&lt;P&gt;# Process: Make Feature Layer&lt;BR /&gt;arcpy.MakeFeatureLayer_management(in_features=ResCopiedFeatures, out_layer=ResCopiedFeatures_Layer, where_clause="", workspace="", field_info="OBJECTID OBJECTID VISIBLE NONE;SHAPE SHAPE VISIBLE NONE;Name Name VISIBLE NONE;FolderPath FolderPath VISIBLE NONE;GlobalID GlobalID VISIBLE NONE;Open_Access Open_Access VISIBLE NONE;Status Status VISIBLE NONE;Installation_Fee Installation_Fee VISIBLE NONE;Promotional_Products Promotional_Products VISIBLE NONE;SHAPE_Length SHAPE_Length VISIBLE NONE;SHAPE_Area SHAPE_Area VISIBLE NONE;Site_Account_ID Site_Account_ID VISIBLE NONE;Unique_ID Unique_ID VISIBLE NONE;BuildStatus BuildStatus VISIBLE NONE;Province Province VISIBLE NONE")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2019 09:42:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679653#M52680</guid>
      <dc:creator>OlindaMombeyarara</dc:creator>
      <dc:date>2019-09-27T09:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert selected features to kml</title>
      <link>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679654#M52681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did it exist from a previous test?&amp;nbsp; If so,&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;arcpy.env.overwriteOutput = False&lt;/SPAN&gt; means it won't produce a new output&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2019 10:31:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679654#M52681</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2019-09-27T10:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Convert selected features to kml</title>
      <link>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679655#M52682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it hasnt worked at all so there is nothing at all, no previous test&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Sep 2019 10:35:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679655#M52682</guid>
      <dc:creator>OlindaMombeyarara</dc:creator>
      <dc:date>2019-09-27T10:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: Convert selected features to kml</title>
      <link>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679656#M52683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Olinda,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has the selection been copied into your temp feature class? or any message in results window?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2019 02:43:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/convert-selected-features-to-kml/m-p/679656#M52683</guid>
      <dc:creator>LeoLiu1</dc:creator>
      <dc:date>2019-10-04T02:43:09Z</dc:date>
    </item>
  </channel>
</rss>

