![](dotnetdiagramimages/image1089.png)
public sealed class GeoprocessingProjectItem : ArcGIS.Desktop.Internal.Catalog.ItemInfo, ArcGIS.Desktop.Core.IMetadata, ArcGIS.Desktop.Core.IProjectItem, ArcGIS.Desktop.Core.ISearchableItem, System.ComponentModel.INotifyPropertyChanged
Public NotInheritable Class GeoprocessingProjectItem Inherits ArcGIS.Desktop.Internal.Catalog.ItemInfo Implements ArcGIS.Desktop.Core.IMetadata, ArcGIS.Desktop.Core.IProjectItem, ArcGIS.Desktop.Core.ISearchableItem, System.ComponentModel.INotifyPropertyChanged
GeoprocessingProjectItem GPProjItem = Project.Current.GetItems<GeoprocessingProjectItem>().FirstOrDefault(item => item.Name.Equals("myToolbox"));
//Gets all the GeoprocessingProjectItem in the current project var GPItems = Project.Current.GetItems<GeoprocessingProjectItem>(); foreach (var tbx in GPItems) { //Do Something with the toolbox }
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(";", new string[] { toolItem.Path, toolItem.Name }); // do something with the newTool // for example, add to a list to track or use them later } }
System.Object
ArcGIS.Desktop.Framework.Contracts.PropertyChangedBase
ArcGIS.Desktop.Core.Item
ArcGIS.Desktop.GeoProcessing.GeoprocessingProjectItem
Target Platforms: Windows 11, Windows 10, Windows 8.1