français
Numéro de bogue NIM001573
Envoyé Mar 15, 2006
Modified Jun 11, 2020
Gravité Medium
S’applique à No Product Found
Version trouvée 9.1
Langage de programmation N/D
Plateforme serveur
Plateforme client
Base de données N/D
Paramètre régional N/D
Statut Not in Current Product Plan
Version corrigée
Résolu par le fournisseur

Bogue NIM001573

Synopsis

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


Informations supplémentaires

No Public Explanation


Autre solution

- 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