Hi,
I'm using a ExecuteToolAsync for join one featureclass and a table. I need to wait for the result to understand if it is good/bad.
The problem is that waiting for the result cause the ui to freeze forever. It seems like the Task doesn't retrieve the result.
What I'm doing wrong?
pspada_WT_0-1668781541082.png
Hi,
ExecuteToolAsync doesn't need QueuedTask.Run. You can use ExecuteToolAsync with CancelableProgressor.
Sample here:
https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9385.html
This might work:
private static async Task<bool> makeJoin(string rightTableName)
{
var pathRight = Path.Combine(Project.Current.DefaultGeodatabasePath, rightTableName);
var args = Geoprocessing.MakeValueArray(fcName, idField, pathRight, zoneField);
var test2 = await Geoprocessing.ExecuteToolAsync("management.AddJoin", args);
return !test2.IsFailed;
}