ArcGIS Pro 3.0 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
    Syntax
    public interface IProjectItem 
    Public Interface IProjectItem 
    Remarks
    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
    Example
    //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;
      Project.Current.AddItem(pagx);
    });
    Import a report file
    //Note: Call within QueuedTask.Run()
    Item reportToImport = ItemFactory.Instance.Create(reportFile);
    Project.Current.AddItem(reportToImport as IProjectItem);
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also