<?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 Retriving paths for network datasets in Enterprise database in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/retriving-paths-for-network-datasets-in-enterprise/m-p/1242797#M9200</link>
    <description>&lt;P&gt;I am developing some ArcGIS Pro UI tools that needs to run a custom python geoprocessing tool as part of the workflow.&lt;/P&gt;&lt;P&gt;I would like to grab the selected network dataset in the map and pass the path of the network dataset on as a parameter to the geoprocessing tool. Retrieving a path for a network dataset located in GDB works fine using the GetDataConnection() on the network dataset layer.&lt;/P&gt;&lt;P&gt;However, when the networks dataset is located in a sql server enterprise geodatabase &lt;SPAN&gt;I am not able to get valid network dataset path for the layer. Preferable the path should use the sde connection file used when the network dataset layer was added to the map (but any valid path pointing out the network dataset for use in a geoprocessing tool would do).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is this possible in any way?&lt;/P&gt;</description>
    <pubDate>Tue, 20 Dec 2022 21:16:56 GMT</pubDate>
    <dc:creator>StephenCochrane</dc:creator>
    <dc:date>2022-12-20T21:16:56Z</dc:date>
    <item>
      <title>Retriving paths for network datasets in Enterprise database</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/retriving-paths-for-network-datasets-in-enterprise/m-p/1242797#M9200</link>
      <description>&lt;P&gt;I am developing some ArcGIS Pro UI tools that needs to run a custom python geoprocessing tool as part of the workflow.&lt;/P&gt;&lt;P&gt;I would like to grab the selected network dataset in the map and pass the path of the network dataset on as a parameter to the geoprocessing tool. Retrieving a path for a network dataset located in GDB works fine using the GetDataConnection() on the network dataset layer.&lt;/P&gt;&lt;P&gt;However, when the networks dataset is located in a sql server enterprise geodatabase &lt;SPAN&gt;I am not able to get valid network dataset path for the layer. Preferable the path should use the sde connection file used when the network dataset layer was added to the map (but any valid path pointing out the network dataset for use in a geoprocessing tool would do).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is this possible in any way?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 21:16:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/retriving-paths-for-network-datasets-in-enterprise/m-p/1242797#M9200</guid>
      <dc:creator>StephenCochrane</dc:creator>
      <dc:date>2022-12-20T21:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Retriving paths for network datasets in Enterprise database</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/retriving-paths-for-network-datasets-in-enterprise/m-p/1242847#M9201</link>
      <description>&lt;P&gt;Well, I think I figured this one out on my own.&lt;/P&gt;&lt;P&gt;It seems I was doing it more complicated than necessary. I was trying to retrieve the path to the network dataset and pass this on to geoprocessing tool as a parameter. But the solution is quite simple and I just have to pass on the actual network dataset layer object as a parameter. So basically this works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;	public void RunGpTool(string toolPath, NetworkAnalystLayer ndLayer)
	{
		var args = Geoprocessing.MakeValueArray(ndLayer);
		IGPResult result = await Geoprocessing.ExecuteToolAsync(toolPath, args, flags: GPExecuteToolFlags.AddOutputsToMap);
	}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 20 Dec 2022 22:58:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/retriving-paths-for-network-datasets-in-enterprise/m-p/1242847#M9201</guid>
      <dc:creator>StephenCochrane</dc:creator>
      <dc:date>2022-12-20T22:58:26Z</dc:date>
    </item>
  </channel>
</rss>

