中文
漏洞编号 NIM001573
已提交 Mar 15, 2006
Modified Jun 11, 2020
严重性 Medium
应用于 No Product Found
找到的版本 9.1
程序语言 N/A
服务器平台
客户端平台
数据库 N/A
区域设置 N/A
状态 Not in Current Product Plan
修正版本
SP 修复

漏洞 NIM001573

摘要

Selection > Zoom to Selected is not working when an XY event layer based on a text file is in the map.


附加信息

No Public Explanation


备用解决方案

- Right clicking the layer > Selection > Zoom to Selected still works properly.
- If I export the txt to DBF and make the event layer based on the DBF, everything works fine.
- If I export the txt events to a shp, everything works fine.
- Calling my own "Zoom to selected" script works:

Private Sub UIButtonControl1_Click()
Dim pMap As IMap
Dim pActiveView As IActiveView
Dim pMxDoc As IMxDocument
Dim pTopo As ITopologicalOperator
Dim pFeat As IFeature
Dim pEnumFeature As IEnumFeature
Dim pEnv As IEnvelope
Dim pPolygon As IPolygon

Set pMxDoc = ThisDocument
Set pMap = pMxDoc.FocusMap
Set pActiveView = pMap

' Create a new polygon
Set pPolygon = New Polygon
' Get the Selection
Set pEnumFeature = pMap.FeatureSelection
pEnumFeature.Reset
Set pFeat = pEnumFeature.Next
' Loop through the selected features
Do While (Not pFeat Is Nothing)
' Make a copy of its geometry and get a
' handle to it in the form of an ITopologicalOperator
Set pTopo = pFeat.ShapeCopy
' Union the shape with what you already have
Set pPolygon = pTopo.Union(pPolygon)
' Go to the next feature
Set pFeat = pEnumFeature.Next
Loop
' Get the envelope of the unioned result
Set pEnv = pPolygon.Envelope
' Put it into the extent of the ActiveView
pActiveView.Extent = pEnv
' Refresh the display
pActiveView.Refresh

End Sub