<?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 Layer Type. Shape vs Geodatabase vs AGOL/Portal Feature Service Passed to geoprocessing tool in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/feature-layer-type-shape-vs-geodatabase-vs-agol/m-p/1162183#M8011</link>
    <description>&lt;P&gt;Thanks. I Used&amp;nbsp;&lt;/P&gt;&lt;P&gt;lyr.Parent + @"\" + lyr.Name + @" #";&lt;/P&gt;&lt;P&gt;which worked on all layers.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Apr 2022 16:22:28 GMT</pubDate>
    <dc:creator>VastBeta</dc:creator>
    <dc:date>2022-04-07T16:22:28Z</dc:date>
    <item>
      <title>Feature Layer Type. Shape vs Geodatabase vs AGOL/Portal Feature Service Passed to geoprocessing tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/feature-layer-type-shape-vs-geodatabase-vs-agol/m-p/1161670#M8007</link>
      <description>&lt;P&gt;I am trying to pass layers on a map to the intersect geoprocessing tool. For local data sources like shapefiles and geodatabase features the script is working fine but when the layer is a feature Service from AGOL or Portal it isn't working unless I use&amp;nbsp;lyr.GetPath().ToString(). Is there a way to pass a layer to a geoprocessing tool regardless of if it is a shp, GDB, or feature service? Or is there a way to tell which ones are feature services so I can pass them in using lyr.GetPath()?&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;&lt;LI-CODE lang="csharp"&gt;var lyrCrossings = map.GetLayersAsFlattenedList().OfType&amp;lt;FeatureLayer&amp;gt;().Where(l =&amp;gt; l.Parent.ToString() == "Group" &amp;amp;&amp;amp; l.IsVisible == true).ToList();
var lyrDatastorePath = await QueuedTask.Run(() =&amp;gt; lyr.GetTable().GetDatastore().GetPath());
var lyrPathTableName = await QueuedTask.Run(() =&amp;gt; lyr.GetTable().GetName());
string lyrPath = Path.Combine(lyrDatastorePath.LocalPath, lyrPathTableName.ToString());
List&amp;lt;string&amp;gt; inputList = new List&amp;lt;string&amp;gt;();
inputList.Add(lyrPath);
inputList.Add(secondPath);
var args = Geoprocessing.MakeValueArray(inputList, outputPath, "", "", "POINT");
string toolPath = "analysis.Intersect";
var result = await Geoprocessing.ExecuteToolAsync(toolPath, args, environments);&lt;/LI-CODE&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 16:38:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/feature-layer-type-shape-vs-geodatabase-vs-agol/m-p/1161670#M8007</guid>
      <dc:creator>VastBeta</dc:creator>
      <dc:date>2022-04-06T16:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer Type. Shape vs Geodatabase vs AGOL/Portal Feature Service Passed to geoprocessing tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/feature-layer-type-shape-vs-geodatabase-vs-agol/m-p/1161948#M8009</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Use the same approach as in line 8. You can pass to MakeValueArray everything.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var lyrCrossings = map.GetLayersAsFlattenedList().OfType&amp;lt;FeatureLayer&amp;gt;().Where(l =&amp;gt; l.Parent.ToString() == "Group" &amp;amp;&amp;amp; l.IsVisible == true).ToList();
var inputList = Geoprocessing.MakeValueArray(lyrCrossings, secondPath);
var args = Geoprocessing.MakeValueArray(inputList, outputPath, "", "", "POINT");
string toolPath = "analysis.Intersect";
var result = await Geoprocessing.ExecuteToolAsync(toolPath, args, environments);&lt;/LI-CODE&gt;&lt;P&gt;If you want to know what exactly takes geoprocessing tool from your layer then you need to execute geoprocessing directly from ArcGIS Pro and copy Python script from History record.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 05:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/feature-layer-type-shape-vs-geodatabase-vs-agol/m-p/1161948#M8009</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-04-07T05:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer Type. Shape vs Geodatabase vs AGOL/Portal Feature Service Passed to geoprocessing tool</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/feature-layer-type-shape-vs-geodatabase-vs-agol/m-p/1162183#M8011</link>
      <description>&lt;P&gt;Thanks. I Used&amp;nbsp;&lt;/P&gt;&lt;P&gt;lyr.Parent + @"\" + lyr.Name + @" #";&lt;/P&gt;&lt;P&gt;which worked on all layers.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Apr 2022 16:22:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/feature-layer-type-shape-vs-geodatabase-vs-agol/m-p/1162183#M8011</guid>
      <dc:creator>VastBeta</dc:creator>
      <dc:date>2022-04-07T16:22:28Z</dc:date>
    </item>
  </channel>
</rss>

