ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Framework.Threading.Tasks Namespace / ProgressDialog Class
Members Example

In This Topic
    ProgressDialog Class
    In This Topic
    Provides visual feedback during long operations
    Syntax
    public class ProgressDialog : System.IDisposable  
    Public Class ProgressDialog 
       Implements System.IDisposable 
    Example
    Running Geoprocessing Tool with ProgressDialog
    var progDlg = new ProgressDialog("Running Geoprocessing Tool", "Cancel", 100, true);
    progDlg.Show();
    
    var progSrc = new CancelableProgressorSource(progDlg);
    
    // prepare input parameter values to CopyFeatures tool
    string input_data = @"C:\data\california.gdb\ca_highways";
    string out_workspace = ArcGIS.Desktop.Core.Project.Current.DefaultGeodatabasePath;
    string out_data = System.IO.Path.Combine(out_workspace, "ca_highways2");
    
    // make a value array of strings to be passed to ExecuteToolAsync
    var parameters = Geoprocessing.MakeValueArray(input_data, out_data);
    
    // execute the tool
    await Geoprocessing.ExecuteToolAsync("management.CopyFeatures", parameters,
        null, new CancelableProgressorSource(progDlg).Progressor, GPExecuteToolFlags.Default);
    
    // dialog hides itself once the execution is complete
    progDlg.Hide();
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Framework.Threading.Tasks.ProgressDialog

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also