<?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 Feature to Polygon in existing layer in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/feature-to-polygon-in-existing-layer/m-p/704123#M54508</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Now that my generic python question has been answered (thanks again!), I have a specific arcpy question, which may have a generic quality as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I frequently use the Construct Polygons tool to create parcel polygons out of line features I've created. The polygons are created in an existing feature class. That works great. But I can't figure out how to duplicate this behavior (polygons added to an existing file) in a script. The closest I can come is using Feature to Polygon, which does create the polygons, but in a new feature class. I suppose I could then copy the new polygons to the existing table and delete the created one, but this seems like an extra step compared to the Topology toolbar tool. I know some other tools on the toolbar work this way compared to their toolbox equivalents also. Is there a function I'm missing, or is this just the way it is? Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import arcpy

lineFeature = arcpy.GetParameterAsText(0)
polygonFeature = arcpy.GetParameterAsText(1)

arcpy.FeatureToPolygon_management(lineFeature, polygonFeature, "", "NO_ATTRIBUTES", "")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Mar 2012 18:24:43 GMT</pubDate>
    <dc:creator>Zeke</dc:creator>
    <dc:date>2012-03-20T18:24:43Z</dc:date>
    <item>
      <title>Feature to Polygon in existing layer</title>
      <link>https://community.esri.com/t5/python-questions/feature-to-polygon-in-existing-layer/m-p/704123#M54508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Now that my generic python question has been answered (thanks again!), I have a specific arcpy question, which may have a generic quality as well.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I frequently use the Construct Polygons tool to create parcel polygons out of line features I've created. The polygons are created in an existing feature class. That works great. But I can't figure out how to duplicate this behavior (polygons added to an existing file) in a script. The closest I can come is using Feature to Polygon, which does create the polygons, but in a new feature class. I suppose I could then copy the new polygons to the existing table and delete the created one, but this seems like an extra step compared to the Topology toolbar tool. I know some other tools on the toolbar work this way compared to their toolbox equivalents also. Is there a function I'm missing, or is this just the way it is? Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import arcpy

lineFeature = arcpy.GetParameterAsText(0)
polygonFeature = arcpy.GetParameterAsText(1)

arcpy.FeatureToPolygon_management(lineFeature, polygonFeature, "", "NO_ATTRIBUTES", "")
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Mar 2012 18:24:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-to-polygon-in-existing-layer/m-p/704123#M54508</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2012-03-20T18:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: Feature to Polygon in existing layer</title>
      <link>https://community.esri.com/t5/python-questions/feature-to-polygon-in-existing-layer/m-p/704124#M54509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know of any way to circumvent the "convert-&amp;gt;append-&amp;gt;delete" workflow, but if you're doing this on a small number of line features numerous times and have the need for speed, you might want to look into using the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//002w0000005s000000" rel="nofollow noopener noreferrer" target="_blank"&gt;"in_memory" workspace &lt;/A&gt;&lt;SPAN&gt;(probably my favourite ArcGIS secret).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

lineFeature = "H:/GIS_Data/TEMP.gdb/lines"
intPoly = "in_memory/intpoly"
polygonFeature = "H:/GIS_Data/TEMP.gdb/poly"

arcpy.FeatureToPolygon_management(lineFeature, intPoly, "", "NO_ATTRIBUTES", "")
arcpy.Append_management(intPoly, polygonFeature, "NO_TEST")
arcpy.Delete_management(intPoly)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:36:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-to-polygon-in-existing-layer/m-p/704124#M54509</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-12T05:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Feature to Polygon in existing layer</title>
      <link>https://community.esri.com/t5/python-questions/feature-to-polygon-in-existing-layer/m-p/704125#M54510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmm, well, ok. I know many GIS tasks require multiple steps, just thought that since there are toolbar tools that can create in an existing feature class, they would be available through arcpy. Who knows, maybe the toolbar methods use the same method with an intermediate temp feature class behind the scenes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying to create more automated procedures for coworkers that don't know much ArcGIS. The less actual editing they have to do, the better for all of us.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the in_memory info, I'll check that out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2012 11:49:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-to-polygon-in-existing-layer/m-p/704125#M54510</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2012-03-21T11:49:25Z</dc:date>
    </item>
  </channel>
</rss>

