Selection > Zoom to Selected is not working when an XY event layer based on a text file is in the map.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM001573
已提交
March 15, 2006
上次修改时间
April 2, 2025
适用范围
No Product Found
找到的版本
9.1
状态
Will Not Be Addressed
开发团队已考虑过该问题或请求,并决定不会解决该问题。 问题的“其他信息”部分可能包含进一步说明。
附加信息
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 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