In ArcGIS Pro version 2.0.0 I use this code to execute merge tool
public async Task<bool> ExecuteToolAsync()
{
var valueArray = await QueuedTask.Run(() =>
{
// Creates a 8000-meter buffer around the geometry object
// null indicates a default output name is used
return Geoprocessing.MakeValueArray(_inputs, _output);
});
var result = await Geoprocessing.ExecuteToolAsync("Merge_management",
valueArray);
return !result.IsFailed;
}
where _inputs is list of fullpath of layers. it works well.
To execute intersect tool I use this:
public async Task<bool> ExecuteToolAsync()
{
var _inpputs= new List<string>() { _featureLayer1, _featureLayer2 };
var valueArray = await QueuedTask.Run(() =>
Geoprocessing.MakeValueArray(_inpputs, _outputFeatureClass, "ALL, "0",
"POINT"));
var result = await Geoprocessing.ExecuteToolAsync("Intersect_analysis",
valueArray);
return !result.IsFailed;
}
It doesn't work. How can I solve this?