//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. //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); });
//Note: Call within QueuedTask.Run() Item reportToImport = ItemFactory.Instance.Create(reportFile); Project.Current.AddItem(reportToImport as IProjectItem);
Target Platforms: Windows 11, Windows 10