//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);
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);
System.Object
ArcGIS.Desktop.Core.CreateProjectSettings
Target Platforms: Windows 11, Windows 10, Windows 8.1