Item Create( string uri, ItemFactory.ItemType itemType )
Function Create( _ ByVal uri As String, _ Optional ByVal itemType As ItemFactory.ItemType _ ) As Item
Parameters
- uri
- itemType
Item Create( string uri, ItemFactory.ItemType itemType )
Function Create( _ ByVal uri As String, _ Optional ByVal itemType As ItemFactory.ItemType _ ) As Item
//Adding a folder connection string folderPath = "@C:\\myDataFolder"; var folder = await QueuedTask.Run(() => { //Create the folder connection project item var item = ItemFactory.Instance.Create(folderPath) as IProjectItem; //If it is successfully added to the project, return it otherwise null return Project.Current.AddItem(item) ? item as FolderConnectionProjectItem : null; }); //Adding a Geodatabase: string gdbPath = "@C:\\myDataFolder\\myData.gdb"; var newlyAddedGDB = await QueuedTask.Run(() => { //Create the File GDB project item var item = ItemFactory.Instance.Create(gdbPath) as IProjectItem; //If it is successfully added to the project, return it otherwise null return Project.Current.AddItem(item) ? item as GDBProjectItem : null; });
Target Platforms: Windows 11, Windows 10