日本語
バグ番号 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