ArcGIS Pro 新建一个Aprx,导入Mxd
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);
Item mxdToImport = ItemFactory.Instance.Create(@"C:\Projects\RegionalSurvey\LatestResults.mxd"); var addedMxd = await QueuedTask.Run( () => Project.Current.AddItem(mxdToImport as IProjectItem));