<?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: feature to polygon python script working but not working when called from dotnet arcgis pro sdk in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144354#M63771</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Just a few ideas here:&lt;/P&gt;&lt;P&gt;On line 73, it looks like you are creating a list of layers, but the FeatureToPolygon tool in the management toolbox seems to require a single FeatureLayer as input.&amp;nbsp; Are you saying that when you call the same tool in Python you are passing in a List of layers to the tool?&amp;nbsp; Could you show the value of input4layers variable before it gets passed into the tool?&amp;nbsp; Also could you attempt to run the tool, with only the ElectricLine layer?&lt;/P&gt;</description>
    <pubDate>Tue, 15 Feb 2022 22:29:28 GMT</pubDate>
    <dc:creator>RobBurke</dc:creator>
    <dc:date>2022-02-15T22:29:28Z</dc:date>
    <item>
      <title>feature to polygon python script working but not working when called from dotnet arcgis pro sdk</title>
      <link>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144227#M63762</link>
      <description>&lt;P&gt;feature to polygon python script working but not working when called from dotnet arcgis pro sdk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edlaanil_0-1644951437618.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33981iA018C4EA7359C0F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edlaanil_0-1644951437618.png" alt="edlaanil_0-1644951437618.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edlaanil_1-1644951475258.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33982i079897E197E4E105/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edlaanil_1-1644951475258.png" alt="edlaanil_1-1644951475258.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 19:01:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144227#M63762</guid>
      <dc:creator>edlaanil</dc:creator>
      <dc:date>2022-02-15T19:01:36Z</dc:date>
    </item>
    <item>
      <title>Re: feature to polygon python script working but not working when called from dotnet arcgis pro sdk</title>
      <link>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144354#M63771</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Just a few ideas here:&lt;/P&gt;&lt;P&gt;On line 73, it looks like you are creating a list of layers, but the FeatureToPolygon tool in the management toolbox seems to require a single FeatureLayer as input.&amp;nbsp; Are you saying that when you call the same tool in Python you are passing in a List of layers to the tool?&amp;nbsp; Could you show the value of input4layers variable before it gets passed into the tool?&amp;nbsp; Also could you attempt to run the tool, with only the ElectricLine layer?&lt;/P&gt;</description>
      <pubDate>Tue, 15 Feb 2022 22:29:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144354#M63771</guid>
      <dc:creator>RobBurke</dc:creator>
      <dc:date>2022-02-15T22:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: feature to polygon python script working but not working when called from dotnet arcgis pro sdk</title>
      <link>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144559#M63777</link>
      <description>&lt;P&gt;here my complete code for the Geoprocessing tool to run in the dotnet arcpro sdk&lt;/P&gt;&lt;P&gt;await QueuedTask.Run(async () =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;MapView mapvView = MapView.Active;&lt;BR /&gt;FeatureLayer layer1 = mapvView.Map.GetLayersAsFlattenedList().&lt;BR /&gt;OfType&amp;lt;FeatureLayer&amp;gt;().FirstOrDefault(l =&amp;gt; l.Name == "ElectricLine");&lt;BR /&gt;FeatureLayer layer2 = mapvView.Map.GetLayersAsFlattenedList().&lt;BR /&gt;OfType&amp;lt;FeatureLayer&amp;gt;().FirstOrDefault(l =&amp;gt; l.Name == "ElectricLine_temp");&lt;BR /&gt;string FLPath1 = layer1.GetFeatureClass().GetDatastore().GetPath().AbsolutePath;&lt;BR /&gt;var FLPathCombine1 = System.IO.Path.GetFullPath(FLPath1);&lt;BR /&gt;string infc1 = System.IO.Path.Combine(FLPathCombine1, layer1.Name);&lt;BR /&gt;string infc2 = System.IO.Path.Combine(FLPathCombine1, layer2.Name);&lt;BR /&gt;&lt;BR /&gt;string input1layers = "[" + infc1;&lt;BR /&gt;string commainputlayers = ",";&lt;BR /&gt;string input2layers = infc2 + "]";&lt;BR /&gt;string input4layers = input1layers + commainputlayers + input2layers;&lt;/P&gt;&lt;P&gt;string Outputpoly = System.IO.Path.Combine(FLPathCombine1, "temppolyoutput");&lt;/P&gt;&lt;P&gt;string cluster_tolerance = "";&lt;BR /&gt;string attributes = "NO_ATTRIBUTES";&lt;BR /&gt;string label_features = "";&lt;/P&gt;&lt;P&gt;var environments1 = Geoprocessing.MakeEnvironmentArray(overwriteoutput: true);&lt;BR /&gt;var parameters1 = Geoprocessing.MakeValueArray(input4layers, Outputpoly, cluster_tolerance, attributes, label_features);&lt;BR /&gt;var gpResult1 = await Geoprocessing.ExecuteToolAsync("FeatureToPolygon_management", parameters1, environments1);&lt;BR /&gt;Geoprocessing.ShowMessageBox(gpResult1.Messages, "GP Messages", gpResult1.IsFailed ? GPMessageBoxStyle.Error : GPMessageBoxStyle.Error);&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;catch (Exception exc)&lt;BR /&gt;{&lt;BR /&gt;// Catch any exception found and display in a message box&lt;BR /&gt;ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show("Exception caught while trying to run GP tool: " + exc.Message);&lt;BR /&gt;return;&lt;BR /&gt;}&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will be great if you help me , thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 12:17:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144559#M63777</guid>
      <dc:creator>edlaanil</dc:creator>
      <dc:date>2022-02-16T12:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: feature to polygon python script working but not working when called from dotnet arcgis pro sdk</title>
      <link>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144898#M63793</link>
      <description>&lt;P&gt;That is a lot of code to attempt to debug.&amp;nbsp; Could you narrow it down, by answering a few questions.&amp;nbsp;&amp;nbsp;&lt;SPAN&gt;Could you set a break point, to then show us the value of the input4layers variable before it gets passed into the tool?&amp;nbsp; Also could you attempt to run the tool with only the ElectricLine layer and let us know the results?&amp;nbsp; I don't think that tool takes a list of layers, did you find a reference in the help showing the tool processing a list or array?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Feb 2022 21:26:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1144898#M63793</guid>
      <dc:creator>RobBurke</dc:creator>
      <dc:date>2022-02-16T21:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: feature to polygon python script working but not working when called from dotnet arcgis pro sdk</title>
      <link>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1145001#M63796</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="edlaanil_0-1645059334732.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/34198iB07A56B4055927FE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="edlaanil_0-1645059334732.png" alt="edlaanil_0-1645059334732.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;i got the output with same code running no issues&amp;nbsp; one layer-, thank you can we run for both layers as mentioned below in the python code which is running for both layers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ElectricLine_Temp = "C:\\Users\\anile\\OneDrive\\Desktop\\ANIL_INVANTGE\\1.DATA\\working_DB\\Test.gdb\\ElectricLine_Temp"&lt;BR /&gt;ElectricLine = "C:\\Users\\anile\\OneDrive\\Desktop\\ANIL_INVANTGE\\1.DATA\\working_DB\\Test.gdb\\ElectricLine"&lt;/P&gt;&lt;P&gt;# Process: Feature To Polygon (Feature To Polygon) (management)&lt;BR /&gt;polytemp123 = "C:\\Users\\anile\\OneDrive\\Desktop\\ANIL_INVANTGE\\1.DATA\\working_DB\\Test.gdb\\polytemp14"&lt;BR /&gt;arcpy.management.FeatureToPolygon(in_features=[ElectricLine_Temp, ElectricLine], out_feature_class=polytemp123, cluster_tolerance="", attributes="ATTRIBUTES", label_features="")&lt;/P&gt;&lt;P&gt;in&amp;nbsp; string input4layers = input1layers + commainputlayers + input2layers;&lt;/P&gt;&lt;P&gt;value is&amp;nbsp;&amp;nbsp;[ElectricLine_Temp, ElectricLine]&lt;/P&gt;&lt;P&gt;please kindly help me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 00:59:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/feature-to-polygon-python-script-working-but-not/m-p/1145001#M63796</guid>
      <dc:creator>edlaanil</dc:creator>
      <dc:date>2022-02-17T00:59:24Z</dc:date>
    </item>
  </channel>
</rss>

