-
Notifications
You must be signed in to change notification settings - Fork 120
ProSnippets Content
uma2526 edited this page May 12, 2021
·
22 revisions
Language: C#
Subject: Content
Contributor: ArcGIS Pro SDK Team <[email protected]>
Organization: esri, http://www.esri.com
Date: 5/5/2021
ArcGIS Pro: 2.8
Visual Studio: 2017, 2019
.NET Target Framework: 4.8
//Create an empty project. The project will be created in the default folder
//It will be named MyProject1, MyProject2, or similar...
await Project.CreateAsync();
//Settings used to create a new project
CreateProjectSettings projectSettings = new CreateProjectSettings()
{
//Sets the name of the project that will be created
Name = @"C:\Data\MyProject1\MyProject1.aprx"
};
//Create the new project
await Project.CreateAsync(projectSettings);
//Get Pro's default project settings.
var defaultProjectSettings = Project.GetDefaultProjectSettings();
//Create a new project using the default project settings
await Project.CreateAsync(defaultProjectSettings);
//Settings used to create a new project
CreateProjectSettings projectSettings = new CreateProjectSettings()
{
//Sets the project's name
Name = "New Project",
//Path where new project will be stored in
LocationPath = @"C:\Data\NewProject",
//Sets the project template that will be used to create the new project
TemplatePath = @"C:\Data\MyProject1\CustomTemplate.aptx"
};
//Create the new project
await Project.CreateAsync(projectSettings);
//Settings used to create a new project
CreateProjectSettings proTemplateSettings = new CreateProjectSettings()
{
//Sets the project's name
Name = "New Project",
//Path where new project will be stored in
LocationPath = @"C:\Data\NewProject",
//Select which Pro template you like to use
TemplateType = TemplateType.Catalog
//TemplateType = TemplateType.LocalScene
//TemplateType = TemplateType.GlobalScene
//TemplateType = TemplateType.Map
};
//Create the new project
await Project.CreateAsync(proTemplateSettings);
//Opens an existing project or project package
await Project.OpenAsync(@"C:\Data\MyProject1\MyProject1.aprx");
//Gets the current project
var project = Project.Current;
//Gets the location of the current project; that is, the path to the current project file (*.aprx)
string projectPath = Project.Current.URI;
var projGDBPath = Project.Current.DefaultGeodatabasePath;
//Saves the project
await Project.Current.SaveAsync();
//The project's dirty state indicates changes made to the project have not yet been saved.
bool isProjectDirty = Project.Current.IsDirty;
//Saves a copy of the current project file (*.aprx) to the specified location with the specified file name,
//then opens the new project file
await Project.Current.SaveAsAsync(@"C:\Data\MyProject1\MyNewProject1.aprx");
//A project cannot be closed using the ArcGIS Pro API.
//A project is only closed when another project is opened, a new one is created, or the application is shutdown.
await QueuedTask.Run(() =>
{
//Note: see also MapFactory in ArcGIS.Desktop.Mapping
var map = MapFactory.Instance.CreateMap("New Map", MapType.Map, MapViewingMode.Map, Basemap.Oceans);
ProApp.Panes.CreateMapPaneAsync(map);
});
//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 succesfully 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 succesfully added to the project, return it otherwise null
return Project.Current.AddItem(item) ? item as GDBProjectItem : null;
});
IEnumerable<Item> allProjectItems = Project.Current.GetItems<Item>();
foreach (var pi in allProjectItems)
{
//Do Something
}
IEnumerable<MapProjectItem> newMapItemsContainer = project.GetItems<MapProjectItem>();
await QueuedTask.Run(() =>
{
foreach (var mp in newMapItemsContainer)
{
//Do Something with the map. For Example:
Map myMap = mp.GetMap();
}
});
MapProjectItem mapProjItem = Project.Current.GetItems<MapProjectItem>().FirstOrDefault(item => item.Name.Equals("EuropeMap"));
IEnumerable<StyleProjectItem> newStyleItemsContainer = null;
newStyleItemsContainer = Project.Current.GetItems<StyleProjectItem>();
foreach (var styleItem in newStyleItemsContainer)
{
//Do Something with the style.
}
var container = Project.Current.GetItems<StyleProjectItem>();
StyleProjectItem testStyle = container.FirstOrDefault(style => (style.Name == "ArcGIS 3D"));
StyleItem cone = null;
if (testStyle != null)
cone = testStyle.LookupItem(StyleItemType.PointSymbol, "Cone_Volume_3");
IEnumerable<GDBProjectItem> newGDBItemsContainer = null;
newGDBItemsContainer = Project.Current.GetItems<GDBProjectItem>();
foreach (var GDBItem in newGDBItemsContainer)
{
//Do Something with the GDB.
}
GDBProjectItem GDBProjItem = Project.Current.GetItems<GDBProjectItem>().FirstOrDefault(item => item.Name.Equals("myGDB"));
IEnumerable<ServerConnectionProjectItem> newServerConnections = null;
newServerConnections = project.GetItems<ServerConnectionProjectItem>();
foreach (var serverItem in newServerConnections)
{
//Do Something with the server connection.
}
ServerConnectionProjectItem serverProjItem = Project.Current.GetItems<ServerConnectionProjectItem>().FirstOrDefault(item => item.Name.Equals("myServer"));
//Gets all the folder connections in the current project
var projectFolders = Project.Current.GetItems<FolderConnectionProjectItem>();
foreach (var FolderItem in projectFolders)
{
//Do Something with the Folder connection.
}
//Gets a specific folder connection in the current project
FolderConnectionProjectItem myProjectFolder = Project.Current.GetItems<FolderConnectionProjectItem>().FirstOrDefault(folderPI => folderPI.Name.Equals("myDataFolder"));
// Remove a folder connection from a project; the folder stored on the local disk or the network is not deleted
FolderConnectionProjectItem folderToRemove = Project.Current.GetItems<FolderConnectionProjectItem>().FirstOrDefault(myfolder => myfolder.Name.Equals("PlantSpecies"));
if (folderToRemove != null)
Project.Current.RemoveItem(folderToRemove as IProjectItem);
LayoutProjectItem layoutProjItem = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault(item => item.Name.Equals("myLayout"));
//Gets all the layouts in the current project
var projectLayouts = Project.Current.GetItems<LayoutProjectItem>();
foreach (var layoutItem in projectLayouts)
{
//Do Something with the layout
}
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
}
List<Item> _mxd = new List<Item>();
//Gets all the folder connections in the current project
var allFoldersItem = Project.Current.GetItems<FolderConnectionProjectItem>();
if (allFoldersItem != null)
{
//iterate through all the FolderConnectionProjectItems found
foreach (var folderItem in allFoldersItem)
{
//Search for mxd files in that folder connection and add it to the List<T>
//Note:ArcGIS Pro automatically creates and dynamically updates a searchable index as you build and work with projects.
//Items are indexed when they are added to a project.
//The first time a folder or database is indexed, indexing may take a while if it contains a large number of items.
//While the index is being created, searches will not return any results.
_mxd.AddRange(folderItem.GetItems());
}
}
var defaultProjectPath = System.IO.Path.Combine(
System.Environment.GetFolderPath(
Environment.SpecialFolder.MyDocuments),
@"ArcGIS\Projects");
//var contentItem = ...
//Check if the MCT is required for Refresh()
if (contentItem.IsMainThreadRequired)
{
//QueuedTask.Run must be used if item.IsMainThreadRequired
//returns true
QueuedTask.Run(() => contentItem.Refresh());
}
else
{
//if item.IsMainThreadRequired returns false, any
//thread can be used to invoke Refresh(), though
//BackgroundTask is preferred.
contentItem.Refresh();
//Or, via BackgroundTask
ArcGIS.Core.Threading.Tasks.BackgroundTask.Run(() =>
contentItem.Refresh(), ArcGIS.Core.Threading.Tasks.BackgroundProgressor.None);
}
// Get the ItemCategories with which an item is associated
Item gdb = ItemFactory.Instance.Create(@"E:\CurrentProject\RegionalPolling\polldata.gdb");
List<ItemCategory> gdbItemCategories = gdb.ItemCategories;
// Browse items using an ItemCategory as a filter
IEnumerable<Item> gdbContents = gdb.GetItems();
IEnumerable<Item> filteredGDBContents1 = gdbContents.Where(item => item.ItemCategories.OfType<ItemCategoryDataSet>().Any());
IEnumerable<Item> filteredGDBContents2 = new ItemCategoryDataSet().Items(gdbContents);
var projectFolder = System.IO.Path.Combine(
System.Environment.GetFolderPath(
Environment.SpecialFolder.MyDocuments),
@"ArcGIS\Projects");
CreateProjectSettings ps = new CreateProjectSettings()
{
Name = "MyProject",
LocationPath = projectFolder,
TemplatePath = @"C:\data\my_templates\custom_template.aptx"
};
var project = await Project.CreateAsync(ps);
//Use Project.Current.ProjectItemContainers
var folderContainer = Project.Current.ProjectItemContainers.First(c => c.Path == "FolderConnection");
var gdbContainer = Project.Current.ProjectItemContainers.First(c => c.Path == "GDB");
var mapContainer = Project.Current.ProjectItemContainers.First(c => c.Path == "Map");
var layoutContainer = Project.Current.ProjectItemContainers.First(c => c.Path == "Layout");
var toolboxContainer = Project.Current.ProjectItemContainers.First(c => c.Path == "GP");
//etc.
//or...use Project.Current.GetProjectItemContainer
folderContainer = Project.Current.GetProjectItemContainer("FolderConnection");
gdbContainer = Project.Current.GetProjectItemContainer("GDB");
mapContainer = Project.Current.GetProjectItemContainer("Map");
layoutContainer = Project.Current.GetProjectItemContainer("Layout");
toolboxContainer = Project.Current.GetProjectItemContainer("GP");
//etc.
//GetItems searches project content
var map = Project.Current.GetItems<MapProjectItem>().FirstOrDefault(m => m.Name == "Map1");
var layout = Project.Current.GetItems<LayoutProjectItem>().FirstOrDefault(m => m.Name == "Layout1");
var folders = Project.Current.GetItems<FolderConnectionProjectItem>();
var style = Project.Current.GetItems<StyleProjectItem>().FirstOrDefault(s => s.Name == "ArcGIS 3D");
//Find item uses a catalog path. The path can be to a file or dataset
var fcPath = @"C:\Pro\CommunitySampleData\Interacting with Maps\Interacting with Maps.gdb\Crimes";
var pdfPath = @"C:\Temp\Layout1.pdf";
var imgPath = @"C:\Temp\AddinDesktop16.png";
var fc = Project.Current.FindItem(fcPath);
var pdf = Project.Current.FindItem(pdfPath);
var img = Project.Current.FindItem(imgPath);
//Get the catalog pane
ArcGIS.Desktop.Core.IProjectWindow projectWindow = Project.GetCatalogPane();
//or get the active catalog view...
//ArcGIS.Desktop.Core.IProjectWindow projectWindow = Project.GetActiveCatalogWindow();
//eg Find a toolbox in the project
string gpName = "Interacting with Maps.tbx";
var toolbox = Project.Current.GetItems<GeoprocessingProjectItem>().FirstOrDefault(tbx => tbx.Name == gpName);
//Select it under Toolboxes
projectWindow.SelectItemAsync(toolbox, true, true, null);//null selects it in the first container - optionally await
//Note: Project.Current.GetProjectItemContainer("GP") would get toolbox container...
//assume toolbox is also under Folders container. Select it under Folders instead of Toolboxes
var foldersContainer = Project.Current.ProjectItemContainers.First(c => c.Path == "FolderConnection");
//We must specify the container because Folders comes second (after Toolboxes)
projectWindow.SelectItemAsync(toolbox, true, true, foldersContainer);//optionally await
//Find a map and select it
var mapItem = Project.Current.GetItems<MapProjectItem>().FirstOrDefault(m => m.Name == "Map");
//Map only occurs under "Maps" so the container need not be specified
projectWindow.SelectItemAsync(mapItem, true, false, null);
var itemFolder = ItemFactory.Instance.Create(@"d:\data");
// is the folder item already a favorite?
var fav = FavoritesManager.Current.GetFavorite(itemFolder);
if (fav == null)
{
if (FavoritesManager.Current.CanAddAsFavorite(itemFolder))
{
fav = FavoritesManager.Current.AddFavorite(itemFolder);
}
}
string gdbPath = "@C:\\myDataFolder\\myData.gdb";
var itemGDB = ItemFactory.Instance.Create(gdbPath);
// is the item already a favorite?
var fav = FavoritesManager.Current.GetFavorite(itemGDB);
// no; add it with IsAddedToAllNewProjects set to true
if (fav != null)
{
if (FavoritesManager.Current.CanAddAsFavorite(itemGDB))
FavoritesManager.Current.InsertFavorite(itemGDB, 1, true);
}
StyleProjectItem styleItem = Project.Current.GetItems<StyleProjectItem>().
FirstOrDefault(style => (style.Name == "ArcGIS 3D"));
if (FavoritesManager.Current.CanAddAsFavorite(styleItem))
{
// add to favorites with IsAddedToAllNewProjects set to false
FavoritesManager.Current.AddFavorite(styleItem);
}
var itemFolder = ItemFactory.Instance.Create(@"d:\data");
// is the folder item already a favorite?
var fav = FavoritesManager.Current.GetFavorite(itemFolder);
if (fav != null)
{
if (fav.IsAddedToAllNewProjects)
FavoritesManager.Current.ClearIsAddedToAllNewProjects(fav.Item);
else
FavoritesManager.Current.SetIsAddedToAllNewProjects(fav.Item);
}
var favorites = FavoritesManager.Current.GetFavorites();
foreach (var favorite in favorites)
{
bool isAddedToAllProjects = favorite.IsAddedToAllNewProjects;
// retrieve the underlying item of the favorite
Item item = favorite.Item;
// Item properties
var itemType = item.TypeID;
var path = item.Path;
// if it's a folder item
if (item is FolderConnectionProjectItem)
{
}
// if it's a goedatabase item
else if (item is GDBProjectItem)
{
}
// else
}
var favorites = FavoritesManager.Current.GetFavorites();
foreach (var favorite in favorites)
FavoritesManager.Current.RemoveFavorite(favorite.Item);
ArcGIS.Desktop.Core.Events.FavoritesChangedEvent.Subscribe((args) =>
{
// favorites have changed
int count = FavoritesManager.Current.GetFavorites().Count;
});
Item gdbItem = ItemFactory.Instance.Create(@"C:\projectAlpha\GDBs\regionFive.gdb");
IMetadata gdbMetadataItem = gdbItem as IMetadata;
string gdbXMLMetadataXmlAsString = string.Empty;
gdbXMLMetadataXmlAsString = await QueuedTask.Run(() => gdbMetadataItem.GetXml());
//check metadata was returned
if (!string.IsNullOrEmpty(gdbXMLMetadataXmlAsString))
{
//use the metadata
}
await QueuedTask.Run(() =>
{
var xml = System.IO.File.ReadAllText(@"E:\Data\Metadata\MetadataForFeatClass.xml");
//Will throw InvalidOperationException if the metadata cannot be changed
//so check "CanEdit" first
if (featureClassMetadataItem.CanEdit())
featureClassMetadataItem.SetXml(xml);
});
bool canEdit1;
//Call CanEdit before calling SetXml
await QueuedTask.Run(() => canEdit1 = metadataItemToCheck.CanEdit());
string syncedMetadataXml = string.Empty;
await QueuedTask.Run(() => syncedMetadataXml = metadataItemToSync.Synchronize());
Item featureClassItem = ItemFactory.Instance.Create(@"C:\projectAlpha\GDBs\regionFive.gdb\SourceFeatureClass");
await QueuedTask.Run(() => metadataItemImport.CopyMetadataFromItem(featureClassItem));
Item: Updates metadata with the imported metadata - the input path can be the path to an item with metadata, or a URI to a XML file: ImportMetadata
// the input path can be the path to an item with metadata, or a URI to an XML file
IMetadata metadataItemImport1 = null;
await QueuedTask.Run(() => metadataItemImport1.ImportMetadata(@"E:\YellowStone.gdb\MyDataset\MyFeatureClass", MDImportExportOption.esriCurrentMetadataStyle));
// the input path can be the path to an item with metadata, or a URI to an XML file
await QueuedTask.Run(() => metadataItemImport2.ImportMetadata(@"E:\YellowStone.gdb\MyDataset\MyFeatureClass", MDImportExportOption.esriCustomizedStyleSheet, @"E:\StyleSheets\Import\MyImportStyleSheet.xslt"));
await QueuedTask.Run(() => metadataItemExport1.ExportMetadata(@"E:\Temp\OutputXML.xml", MDImportExportOption.esriCurrentMetadataStyle, MDExportRemovalOption.esriExportExactCopy));
await QueuedTask.Run(() => metadataItemExport2.ExportMetadata(@"E:\Temp\OutputXML.xml", MDImportExportOption.esriCustomizedStyleSheet, MDExportRemovalOption.esriExportExactCopy, @"E:\StyleSheets\Export\MyExportStyleSheet.xslt"));
await QueuedTask.Run(() => metadataItemToSaveAsXML.SaveMetadataAsXML(@"E:\Temp\OutputXML.xml", MDSaveAsXMLOption.esriExactCopy));
await QueuedTask.Run(() => metadataItemToSaveAsHTML.SaveMetadataAsHTML(@"E:\Temp\OutputHTML.htm", MDSaveAsHTMLOption.esriCurrentMetadataStyle));
await QueuedTask.Run(() => metadataItemToSaveAsUsingCustomXSLT.SaveMetadataAsUsingCustomXSLT(@"E:\Data\Metadata\CustomXSLT.xsl", @"E:\Temp\OutputXMLCustom.xml"));
var fgdcItem = ItemFactory.Instance.Create(@"C:\projectAlpha\GDBs\testData.gdb");
await QueuedTask.Run(() => fgdcItem.UpgradeMetadata(MDUpgradeOption.esriUpgradeFgdcCsdgm));
//Must be on the QueuedTask.Run()
var unit_formats = Enum.GetValues(typeof(UnitFormatType))
.OfType<UnitFormatType>().ToList();
System.Diagnostics.Debug.WriteLine("All available units\r\n");
foreach (var unit_format in unit_formats)
{
var units = DisplayUnitFormats.Instance.GetPredefinedProjectUnitFormats(unit_format);
System.Diagnostics.Debug.WriteLine(unit_format.ToString());
foreach (var display_unit_format in units)
{
var line = $"{display_unit_format.DisplayName}, {display_unit_format.UnitCode}";
System.Diagnostics.Debug.WriteLine(line);
}
System.Diagnostics.Debug.WriteLine("");
}
//Must be on the QueuedTask.Run()
var unit_formats = Enum.GetValues(typeof(UnitFormatType))
.OfType<UnitFormatType>().ToList();
System.Diagnostics.Debug.WriteLine("Project units\r\n");
foreach (var unit_format in unit_formats)
{
var units = DisplayUnitFormats.Instance.GetProjectUnitFormats(unit_format);
System.Diagnostics.Debug.WriteLine(unit_format.ToString());
foreach (var display_unit_format in units)
{
var line = $"{display_unit_format.DisplayName}, {display_unit_format.UnitCode}";
System.Diagnostics.Debug.WriteLine(line);
}
System.Diagnostics.Debug.WriteLine("");
}
//Must be on the QueuedTask.Run()
//UnitFormatType.Angular, UnitFormatType.Area, UnitFormatType.Distance,
//UnitFormatType.Direction, UnitFormatType.Location, UnitFormatType.Page
//UnitFormatType.Symbol2D, UnitFormatType.Symbol3D
var units = DisplayUnitFormats.Instance.GetProjectUnitFormats(UnitFormatType.Distance);
//Must be on the QueuedTask.Run()
var unit_formats = Enum.GetValues(typeof(UnitFormatType))
.OfType<UnitFormatType>().ToList();
System.Diagnostics.Debug.WriteLine("Default project units\r\n");
foreach (var unit_format in unit_formats)
{
var default_unit = DisplayUnitFormats.Instance.GetDefaultProjectUnitFormat(unit_format);
var line = $"{unit_format.ToString()}: {default_unit.DisplayName}, {default_unit.UnitCode}";
System.Diagnostics.Debug.WriteLine(line);
}
System.Diagnostics.Debug.WriteLine("");
//Must be on the QueuedTask.Run()
//UnitFormatType.Angular, UnitFormatType.Area, UnitFormatType.Distance,
//UnitFormatType.Direction, UnitFormatType.Location, UnitFormatType.Page
//UnitFormatType.Symbol2D, UnitFormatType.Symbol3D
var default_unit = DisplayUnitFormats.Instance.GetDefaultProjectUnitFormat(
UnitFormatType.Distance);
//Must be on the QueuedTask.Run()
//UnitFormatType.Angular, UnitFormatType.Area, UnitFormatType.Distance,
//UnitFormatType.Direction, UnitFormatType.Location
//Get the full list of all available location units
var all_units = DisplayUnitFormats.Instance.GetPredefinedProjectUnitFormats(
UnitFormatType.Location);
//keep units with an even factory code
var list_units = all_units.Where(du => du.UnitCode % 2 == 0).ToList();
//set them as the new location unit collection. A new default is not being specified...
DisplayUnitFormats.Instance.SetProjectUnitFormats(list_units);
//set them as the new location unit collection along with a new default
DisplayUnitFormats.Instance.SetProjectUnitFormats(
list_units, list_units.First());
//Note: UnitFormatType.Page, UnitFormatType.Symbol2D, UnitFormatType.Symbol3D
//cannot be set.
//Must be on the QueuedTask.Run()
var unit_formats = Enum.GetValues(typeof(UnitFormatType)).OfType<UnitFormatType>().ToList();
foreach (var unit_type in unit_formats)
{
var current_default = DisplayUnitFormats.Instance.GetDefaultProjectUnitFormat(unit_type);
//Arbitrarily pick the last unit in each unit format list
var replacement = DisplayUnitFormats.Instance.GetProjectUnitFormats(unit_type).Last();
DisplayUnitFormats.Instance.SetDefaultProjectUnitFormat(replacement);
var line = $"{current_default.DisplayName}, {current_default.UnitName}, {current_default.UnitCode}";
var line2 = $"{replacement.DisplayName}, {replacement.UnitName}, {replacement.UnitCode}";
System.Diagnostics.Debug.WriteLine($"Format: {unit_type.ToString()}");
System.Diagnostics.Debug.WriteLine($" Current default: {line}");
System.Diagnostics.Debug.WriteLine($" Replacement default: {line2}");
}
//UnitFormatType.Angular, UnitFormatType.Area, UnitFormatType.Distance,
//UnitFormatType.Direction, UnitFormatType.Location
var angle_units = DisplayUnitFormats.Instance.GetProjectUnitFormats(UnitFormatType.Angular);
//Edit the display name of each unit - append the abbreviation
foreach (var unit in angle_units)
{
unit.DisplayName = $"{unit.DisplayName} ({unit.Abbreviation})";
}
//apply the changes to the units and set the default to be the first entry
DisplayUnitFormats.Instance.SetProjectUnitFormats(angle_units, angle_units.First());
//The project must be saved to persist the changes...
Home | API Reference | Requirements | Download | Samples
-
Create an empty project
-
Create a new project with specified name
-
Create new project using Pro's default settings
-
New project using a custom template file
-
Create a project using template available with ArcGIS Pro
-
Open an existing project
-
Get the Current project
-
Get location of current project
-
Get the project's default gdb path
-
Save project
-
Check if project needs to be saved
-
SaveAs project
-
Close a project
-
Add a new map to a project
-
Get Recent Projects
-
Clear Recent Projects
-
Remove a Recent Project
-
Get Pinned Projects
-
Clear Pinned Projects
-
Pin / UnPin Projects
-
Get Recent Project Templates
-
Clear Recent Project Templates
-
Remove a Recent Project Template
-
Get Pinned Project Templates
-
Clear Pinned Project Templates
-
Pin / UnPin Project Templates
-
Add a folder connection item to the current project
-
Get all project items
-
Get all "MapProjectItems" for a project
-
Get a specific "MapProjectItem"
-
Get all "StyleProjectItems"
-
Get a specific "StyleProjectItem"
-
Get the "Favorite" StyleProjectItem
-
Get all "GDBProjectItems"
-
Get a specific "GDBProjectItem"
-
Get all "ServerConnectionProjectItems"
-
Get a specific "ServerConnectionProjectItem"
-
Get all folder connections in a project
-
Get a specific folder connection
-
Remove a specific folder connection
-
Gets a specific "LayoutProjectItem"
-
Get all layouts in a project
-
Get a specific "GeoprocessingProjectItem"
-
Get all GeoprocessingProjectItems in a project
-
Search project for a specific item
-
Get the Default Project Folder
-
Refresh the child item for a folder connection Item
-
Get Item Categories
-
Using Item Categories
-
Create Project with Template
-
Select project containers - for use with SelectItemAsync
-
ProjectItem: Get an Item or Find an Item
-
Select an item in the Catalog pane
-
Add a Favorite - Folder
-
Insert a Favorite - Geodatabase path
-
Add a Favorite - Style project item
-
Toggle the flag IsAddedToAllNewProjects for a favorite
-
Get the set of favorites and iterate
-
Remove All Favorites
-
FavoritesChangedEvent
-
Item: Get its IMetadata interface
-
Item: Get an item's metadata: GetXML
-
Item: Set the metadata of an item: SetXML
-
Item: Check the metadata can be edited: CanEdit
-
Item: Updates metadata with the current properties of the item: Synchronize
-
Item: Copy metadata from the source item's metadata: CopyMetadataFromItem
-
Item: Delete certain content from the metadata of the current item: DeleteMetadataContent
-
Item: Updates metadata with the imported metadata - the input path can be the path to an item with metadata, or a URI to a XML file: ImportMetadata
-
Item: Updates metadata with the imported metadata: ImportMetadata
-
Item: export the metadata of the currently selected item: ExportMetadata
-
Item: export the metadata of the currently selected item: ExportMetadata
-
Item: Save the metadata of the current item as XML: SaveMetadataAsXML
-
Item: Save the metadata of the current item as HTML: SaveMetadataAsHTML
-
Item: Save the metadata of the current item using customized XSLT: SaveMetadataAsUsingCustomXSLT
-
Item: Upgrade the metadata of the current item: UpgradeMetadata
-
Get The Full List of All Available Unit Formats
-
Get The List of Unit Formats for the Current Project
-
Get A Specific List of Unit Formats for the Current Project
-
Get The List of Default Formats for the Current Project
-
Get A Specific Default Unit Format for the Current Project
-
Set a Specific List of Unit Formats for the Current Project
-
Set the Defaults for the Project Unit Formats
-
Update Unit Formats for the Project