arcengine 放大到选择集,Zoom to selected features using ArcObject
来源:互联网 发布:手机给淘宝客服发图片 编辑:程序博客网 时间:2024/05/16 08:21
In ArcMap you can zoom to the selected features for a layer by right-clicking the layer and selecting Selection > Zoom to Selected Features. This article shows how to do this task using VBA and ArcObjects.
Procedure
- Start ArcMap.
- Create a new UIButtonControl.
- Right-click the UIButtonControl and select View Source.
- Copy this code into the <!-- <br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->Private Sub UIButtonControl1_Click()'s click event.
Dim pDoc As IMxDocument
Set pDoc = ThisDocument
Dim pMap As IMap
Set pMap = pDoc.FocusMap
Dim pLayer As IFeatureLayer
Dim pFSel As IFeatureSelection
Set pLayer = pMap.Layer(0)
Set pFSel = pLayer
'Get the selected features
Dim pSelSet As ISelectionSet
Set pSelSet = pFSel.SelectionSet
Dim pEnumGeom As IEnumGeometry
Dim pEnumGeomBind As IEnumGeometryBind
Set pEnumGeom = New EnumFeatureGeometry
Set pEnumGeomBind = pEnumGeom
pEnumGeomBind.BindGeometrySource Nothing, pSelSet
Dim pGeomFactory As IGeometryFactory
Set pGeomFactory = New GeometryEnvironment
Dim pGeom As IGeometry
Set pGeom = pGeomFactory.CreateGeometryFromEnumerator(pEnumGeom)
pDoc.ActiveView.Extent = pGeom.Envelope
pDoc.ActiveView.Refresh
End Sub
- arcengine 放大到选择集,Zoom to selected features using ArcObject
- Zoom to Selected Globe Features
- Zoom to Selected Globe Features
- Zoom to Selected Globe Features
- 在ArcGlobe中如何聚焦到选择的图元(How to zoom to selected features in globe)
- How to zoom to selected features in globe
- 删除Migic Zoom 放大显示区域中的“Please upgrade to full version of Magic Zoom”
- zoom 放大縮小屬性
- 图片放大插件Zoom
- ArcEngine中清除选择集刷新问题
- Using GDI+ in a Single Document MFC Project to Rotate, Zoom, and Constraint an Image
- 对于eclipse选择服务器的问题eclipse Cannot create a server using the selected type
- 对于eclipse选择服务器的问题eclipse Cannot create a server using the selected type
- jQuery图片放大预览插件 cloud-zoom
- zoom插件实现图片放大缩小功能
- How to get the Values of Selected Row from a Gridview using ASP.NET
- How-To: Run a MapReduce Job in CDH4 using Advanced Features
- 论文笔记《Feedforward semantic segmentation with zoom-out features》
- java 建立临时文件夹
- 实现JTextfield 的右键 复制、剪切、粘贴功能。
- query did not return a unique result: 2
- 01. What Is Discrete Mathematics(中英字幕 by Ocean-藏心)
- eclipse Swing JFrame 窗口千万不要设置图标 为*.gif格式
- arcengine 放大到选择集,Zoom to selected features using ArcObject
- MDK 编译文件大小说明(Program Size)
- TCP传输文件的实现
- How to zoom to selected features in globe
- 往事流水回忆沙
- 从EXCEL导入数据到数据库,查询不到。
- 奇怪问题:Hibernate 无法更新(update)
- Varnish的系统优化
- JTable 导出 Excel 利用 jxl.jar