<?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: ExecuteToolAsync &amp;quot;FeatureClassToFeatureClass&amp;quot; using &amp;quot;Memory Feature Class&amp;quot; as input in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/executetoolasync-quot-featureclasstofeatureclass/m-p/1090255#M7048</link>
    <description>&lt;P&gt;Fro me it does not matter if I use "&lt;SPAN&gt;FeatureClassToFeatureClass" or "&lt;STRONG&gt;conversion.&lt;/STRONG&gt;FeatureClassToFeatureClass"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I noticed that I have used a custom name for the memory geodatabase which does not seem to be included when using "memory\\*".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Once I have changed it to the "default" memory geodatabase "memory\\*" as arguments works as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Aug 2021 05:47:26 GMT</pubDate>
    <dc:creator>ole1986</dc:creator>
    <dc:date>2021-08-19T05:47:26Z</dc:date>
    <item>
      <title>ExecuteToolAsync "FeatureClassToFeatureClass" using "Memory Feature Class" as input</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/executetoolasync-quot-featureclasstofeatureclass/m-p/1088416#M7027</link>
      <description>&lt;P&gt;I am struggling with an issue using the `geoprocessing.ExecuteToolAsync` while having feature class in a memory Geodatabase.&lt;/P&gt;&lt;P&gt;The Result after "FeatureClassToFeatureClass" executed is declared with `IsFailed = true` but no errors are displayed (listed in ErrorMessages)&lt;/P&gt;&lt;P&gt;Below is a POC&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// "in_memory" or "memory" - both fail
var parameters = Geoprocessing.MakeValueArray("memory\\" + _targetFeatureClass, "C:\SomeOutputDir", "OutputShapeFile");
var environment = Geoprocessing.MakeEnvironmentArray(overwriteoutput: true, workspace: "in_memory", qualifiedFieldNames: false);
var result = await Geoprocessing.ExecuteToolAsync("FeatureClassToFeatureClass", parameters, environment, null, null, GPExecuteToolFlags.None);&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;A workaround is to add the FeatureClass as FeatureLayer and use it as parameter 1. E.g.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// WORKING
var layer = ArcGIS.Desktop.Mapping.LayerFactory.Instance.CreateFeatureLayer(_targetFeatureClass, ArcGIS.Desktop.Mapping.MapView.Active.Map);

// Use the "layer" variable instead
var parameters = Geoprocessing.MakeValueArray(layer, shapeFileOutputDir, shapeFileOutputName);
var environment = Geoprocessing.MakeEnvironmentArray(overwriteoutput: true, qualifiedFieldNames: false);
var result = await Geoprocessing.ExecuteToolAsync("FeatureClassToFeatureClass", parameters, environment, null, null, GPExecuteToolFlags.AddToHistory);&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Is this intented to be the correct way when using memory feature classes?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Aug 2021 14:33:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/executetoolasync-quot-featureclasstofeatureclass/m-p/1088416#M7027</guid>
      <dc:creator>ole1986</dc:creator>
      <dc:date>2021-08-12T14:33:52Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteToolAsync "FeatureClassToFeatureClass" using "Memory Feature Class" as input</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/executetoolasync-quot-featureclasstofeatureclass/m-p/1090154#M7046</link>
      <description>&lt;P&gt;Execution does not fail when I use "memory" as workspace.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Executing a geoprocessing tool requires not only the tool name but also the toolbox name. Feature Class To Feature Class is in the Conversion toolbox.&lt;/P&gt;&lt;P&gt;So, the correct syntax to use the tool will be:&lt;/P&gt;&lt;P&gt;IGPResult result = await Geoprocessing.ExecuteToolAsync("FeatureClassToFeatureClass&lt;STRONG&gt;_conversion&lt;/STRONG&gt;", parameters, environment, null, null, ExecuteToolFlags.AddToHistory);&lt;/P&gt;&lt;P&gt;IGPResult result = await Geoprocessing.ExecuteToolAsync("&lt;STRONG&gt;conversion.&lt;/STRONG&gt;FeatureClassToFeatureClass", parameters, environment, null, null, ExecuteToolFlags.AddToHistory);&lt;/P&gt;&lt;P&gt;If you put the toolbox name after tool name then use an underscore and if using before the tool name then use a dot. Here is an example from Esri github.com site:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Geoprocessing/ApplySymbology/ApplySymbButton.cs" target="_blank" rel="noopener"&gt;https://github.com/Esri/arcgis-pro-sdk-community-samples/blob/master/Geoprocessing/ApplySymbology/ApplySymbButton.cs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 21:27:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/executetoolasync-quot-featureclasstofeatureclass/m-p/1090154#M7046</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2021-08-18T21:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteToolAsync "FeatureClassToFeatureClass" using "Memory Feature Class" as input</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/executetoolasync-quot-featureclasstofeatureclass/m-p/1090255#M7048</link>
      <description>&lt;P&gt;Fro me it does not matter if I use "&lt;SPAN&gt;FeatureClassToFeatureClass" or "&lt;STRONG&gt;conversion.&lt;/STRONG&gt;FeatureClassToFeatureClass"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But I noticed that I have used a custom name for the memory geodatabase which does not seem to be included when using "memory\\*".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Once I have changed it to the "default" memory geodatabase "memory\\*" as arguments works as expected.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 05:47:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/executetoolasync-quot-featureclasstofeatureclass/m-p/1090255#M7048</guid>
      <dc:creator>ole1986</dc:creator>
      <dc:date>2021-08-19T05:47:26Z</dc:date>
    </item>
  </channel>
</rss>

