ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Core Namespace / IProjectItem Interface
Members Example

In This Topic
    IProjectItem Interface
    In This Topic
    Provides basic interface for all project items
    Object Model
    IProjectItem InterfaceProjectItemInfo Class
    public interface IProjectItem 
    Public Interface IProjectItem 
    Any class that is a type of project item must implement IProjectItem. These classes also follow a convention that includes "ProjectItem" as part of their name
    //create a new FolderConnectionProjectItem
    var folderLocationItem = ItemFactory.Instance.Create(@"C:\temp\mydata");
    await QueuedTask.Run(() => Project.Current.AddItem(folderLocationItem as IProjectItem);
    Import a pagx into a project
    //Import a pagx into a project.
    //Create a layout project item from importing a pagx file
    await QueuedTask.Run(() =>
      IProjectItem pagx = ItemFactory.Instance.Create(
                                @"C:\Temp\Layout.pagx") as IProjectItem;
    Import a report file
    //Note: Call within QueuedTask.Run()
    Item reportToImport = ItemFactory.Instance.Create(reportFile);
    Project.Current.AddItem(reportToImport as IProjectItem);

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also