ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.GeoProcessing Namespace / GeoprocessingProjectItem Class / GeoprocessingProjectItem Constructor
Example

In This Topic
    GeoprocessingProjectItem Constructor
    In This Topic
    Represents a GeoProcessing project item.
    Syntax
    Public Function New( _
       ByVal iiv As ItemInfoValue _
    )
    public GeoprocessingProjectItem( 
       ItemInfoValue iiv
    )

    Parameters

    iiv
    Example
    Get Geoprocessing project items
    {
      var gpItems = CoreModule.CurrentProject.Items.OfType<GeoprocessingProjectItem>();
    
      // go through all the available toolboxes
      foreach (var gpItem in gpItems)
      {
        var itemsInsideToolBox = gpItem.GetItems();
    
        // then for each toolbox list the tools inside
        foreach (var toolItem in itemsInsideToolBox)
        {
          string newTool = string.Join(";", [toolItem.Path, toolItem.Name]);
          // do something with the newTool
          // for example, add to a list to track or use them later
        }
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also