AnsweredAssumed Answered

How do I know when a tool has been executed?

Question asked by m.glasesri-de-esridist Employee on Jan 8, 2019
Latest reply on Jan 8, 2019 by rleclair-esristaff

Hi,

 

I use a tool from ArcGIS Pro to convert data from Excel by drag and drop on the map pane.

I used this example as template, but instead of executing this part automatically ...

            var result = await Geoprocessing.ExecuteToolAsync("MakeXYEventLayer_management", new string[] {
                xlsTableName,
                "POINT_X",
                "POINT_Y",
                xlsLayerName,
                "WGS_1984"
}, environments);

I want to call the tool in the GP pane, which lets the user the possibility to change settings:

           var paramValues = Geoprocessing.MakeValueArray(xlsTableName, string.Empty, string.Empty, layerName);
           var path = Path.Combine(@"C:\Program Files\ArcGIS\Pro\Resources\ArcToolBox\Toolboxes\Data Management Tools.tbx", "MakeXYEventLayer");
           Geoprocessing.OpenToolDialog(path, paramValues);

 

This works fine, but of course the user has now to execute the tool manually and after that, I want to call the ApplySymbology Tool (as in the sample code shown):

            await Geoprocessing.ExecuteToolAsync("ApplySymbologyFromLayer_management", new string[] {
              xlsLayerName,
              @"C:\Data\SDK\Default2DPointSymbols.lyrx"
});

 

But how do I get the event when the user has executed the MakeXYEventLayer Tool?

 

Kind regards,

Max

Outcomes