I am developing some ArcGIS Pro UI tools that needs to run a custom python geoprocessing tool as part of the workflow.
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.
However, when the networks dataset is located in a sql server enterprise geodatabase 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).
Is this possible in any way?