Deutsch
Bug-Nummer NIM001573
Erzeugt am Mar 15, 2006
Modified Jun 11, 2020
Schweregrad Medium
Übernehmen für No Product Found
Gefundene Version 9.1
Progr.-Sprache n. z.
Server-Plattform
Client-Plattform
Datenbank n. z.
Gebietsschema n. z.
Status Not in Current Product Plan
Behoben in Version
SP Fixed

Bug NIM001573

Zusammenfassung

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


Zusätzliche Informationen

No Public Explanation


Alternative Lösung

- 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