Select to view content in your preferred language

Geoprocessing.ExecuteToolAsync with Definition Query

352
0
02-24-2022 03:08 PM
VastBeta
New Contributor II

I noticed my code that runs Geoprocessing.ExecuteToolAsync for analysis.intersect wasn't getting the layer's definition query. 

after running something like this i'm am getting the intersect results layer but it is not changing when I add a definition query to the layers. How do I pass this layer with the definition query applied into Geoprocessing.ExecuteToolAsync?

var lyrRoute = map.GetLayersAsFlattenedList().OfType<FeatureLayer>().Where(l => l.Parent.ToString() == "LinearRoute" && l.IsVisible == true).FirstOrDefault();

inputList.Add(lyrRoute.Name);
inputList.Add(lyr.Name);
var args = Geoprocessing.MakeValueArray(inputList, outputPath, "", "", "POINT");
string toolPath = "analysis.Intersect";
var result = await Geoprocessing.ExecuteToolAsync(toolPath, args, environments);

 

 

0 Kudos
0 Replies