ArcGIS三维之图片输出

最近在做地图切片方面的研究,昨天浏览E都市时突然想到ArcSence中三维图片输出的问题。记得以前自己好像用VB做过这方面的开发,还因为找不到输出接口而心烦不已,好像现在又忘记了。早上跑到公司,找到以前写的代码,赶快记录下来,说不定哪一天还可以派上大用场^-^

代码极其简单,可是如果稍加变化,可以做出很漂亮的东西哦!不知道大家想到怎么样去用它没有,我倒是有了一个很好的想法,呵呵!

下面请看代码:

 1ArcGIS三维之图片输出 '输出三维图片
 2ArcGIS三维之图片输出Private Sub menuExportImage_Click()
 3ArcGIS三维之图片输出    '设置保存对话框属性
 4ArcGIS三维之图片输出    With CommonDialog1
 5ArcGIS三维之图片输出        '设置标题
 6ArcGIS三维之图片输出        .DialogTitle = "保存三维图片"
 7ArcGIS三维之图片输出        '只能输入文件名文本框已经存在的文件名 ,隐藏只读,对存在的文件提示是否覆盖
 8ArcGIS三维之图片输出        .flags = cdlOFNPathMustExist + cdlOFNExplorer + cdlOFNHideReadOnly + cdlOFNOverwritePrompt
 9ArcGIS三维之图片输出        '默认的扩展名
10ArcGIS三维之图片输出        .DefaultExt = "jpg"
11ArcGIS三维之图片输出        '文件筛选器
12ArcGIS三维之图片输出        .Filter = "jpg文件|*.jpg|bmp文件|*.bmp"
13ArcGIS三维之图片输出        .CancelError = False
14ArcGIS三维之图片输出        .fileName = ""
15ArcGIS三维之图片输出        '保存
16ArcGIS三维之图片输出        .ShowSave
17ArcGIS三维之图片输出    End With
18ArcGIS三维之图片输出    If Trim(CommonDialog1.fileName <> ""Then
19ArcGIS三维之图片输出        If CommonDialog1.FilterIndex = 1 Then
20ArcGIS三维之图片输出            SceneControl1.SceneViewer.GetScreenShot JPEG, CommonDialog1.fileName
21ArcGIS三维之图片输出        Else
22ArcGIS三维之图片输出            SceneControl1.SceneViewer.GetScreenShot BMP, CommonDialog1.fileName
23ArcGIS三维之图片输出        End If
24ArcGIS三维之图片输出        
25ArcGIS三维之图片输出        MsgBox "图片导出成功!", vbOKOnly, "信息提示!"
26ArcGIS三维之图片输出    End If
27ArcGIS三维之图片输出End Sub

相关文章:

  • 2021-09-25
  • 2022-12-23
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2022-01-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-06-25
  • 2021-11-07
  • 2022-03-07
相关资源
相似解决方案