Selection > Zoom to Selected is not working when an XY event layer based on a text file is in the map.
Last Published: August 25, 2014No Product Found
Bug ID Number
NIM001573
Submitted
March 15, 2006
Last Modified
April 2, 2025
Applies to
No Product Found
Version found
9.1
Status
Will Not Be Addressed
The development team has considered the issue or request and concluded it will not be addressed. The issue's Additional Information section may contain further explanation.
Additional Information
No Public Explanation
Workaround
- 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 IMapDim pActiveView As IActiveViewDim pMxDoc As IMxDocumentDim pTopo As ITopologicalOperatorDim pFeat As IFeatureDim pEnumFeature As IEnumFeatureDim pEnv As IEnvelopeDim pPolygon As IPolygonSet pMxDoc = ThisDocumentSet pMap = pMxDoc.FocusMapSet pActiveView = pMap' Create a new polygonSet pPolygon = New Polygon' Get the SelectionSet pEnumFeature = pMap.FeatureSelectionpEnumFeature.ResetSet pFeat = pEnumFeature.Next' Loop through the selected featuresDo 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.NextLoop' Get the envelope of the unioned resultSet pEnv = pPolygon.Envelope' Put it into the extent of the ActiveViewpActiveView.Extent = pEnv' Refresh the displaypActiveView.RefreshEnd Sub