geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "out_directions");
I tried the following code but only the first call of GetResultDataAsync completes(message box appears for the parameter called), therefore you cannot "execute sequentially GetResultDataAsync".
void geoprocessorTask_JobCompleted(object sender, JobInfoEventArgs e) { Geoprocessor geoprocessorTask = sender as Geoprocessor; geoprocessorTask.GetResultDataCompleted += new EventHandler<GPParameterEventArgs>(geoprocessorTask_GetResultDataCompleted); geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "out_stops"); geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "out_directions"); } void geoprocessorTask_GetResultDataCompleted(object sender, GPParameterEventArgs e) { if (e.Parameter.Name == "out_stops" ) { MessageBox.Show("out_stops"); } // For Out Direction // if (e.Parameter is GPFeatureRecordSetLayer) if (e.Parameter.Name == "out_directions") { MessageBox.Show("out_directions"); } }
Code:geoprocessorTask.GetResultDataAsync(e.JobInfo.JobId, "out_directions"); only allows me to reference only one output form my geoprocessing Task. How do you go about accessing the additional outputs of a gpTask?
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.