• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

gisoracle

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

ArcGIS Pro地图册操作

MapSeriesExportOptions MSExport_custom = new MapSeriesExportOptions()
      {
        ExportPages = ExportPages.Custom,
        CustomPages = "1-3, 5",
        ExportFileOptions = ExportFileOptions.ExportAsSinglePDF,
        ShowSelectedSymbology = false
      };

      //Check to see if the path is valid and export
      if (msPDF.ValidateOutputFilePath())
      {
        layout.Export(msPDF, MSExport_custom);  //Export the PDF to a single, multiple page PDF. 
      }
      #endregion Layout_ExportMS_PDF


      #region Layout_ExportMS_TIFF
      //Export multiple map series pages to TIFF

      //Create a TIFF export format
      TIFFFormat msTIFF = new TIFFFormat()
      {
        Resolution = 300,
        OutputFileName = filePath,
        ColorMode = ColorMode.TwentyFourBitTrueColor,
        HasGeoTiffTags = true,
        HasWorldFile = true
      };

      //Set up the export options for the map series
      MapSeriesExportOptions MSExport_All = new MapSeriesExportOptions()
      {
        ExportPages = ExportPages.All,
        ExportFileOptions = ExportFileOptions.ExportMultipleNames,
        ShowSelectedSymbology = false
      };

      //Check to see if the path is valid and export
      if (msPDF.ValidateOutputFilePath())
      {
        layout.Export(msPDF, MSExport_All);  //Export each page to a TIFF and apppend the page name suffix to each output file 
      }
      #endregion Layout_ExportMS_TIFF


      #region Layout_RefreshMapSeries
      //Refresh the map series associated with the layout.

      //Perform on the worker thread
      await QueuedTask.Run(() =>
      {
        layout.RefreshMapSeries();
      });
      #endregion Layout_RefreshMapSeries


      #region Layout_SaveAsFile
      //Save a layout to a pagx file.

      //Perform on the worker thread
      await QueuedTask.Run(() =>
      {
        layout.SaveAsFile(filePath);
      });

  

posted on 2020-04-02 13:05  gisai  阅读(464)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3