Zoom to selection on point features does not work correctly when the dataframe is in a different coordinate system than the dataset of the point feature class.
上次发布: August 25, 2014ArcGIS for Desktop
漏洞 ID 编号
NIM046716
已提交
July 7, 2009
上次修改时间
June 5, 2024
适用范围
ArcGIS for Desktop
找到的版本
9.3.1
操作系统
Windows OS
操作系统版本
XP
修正版本
10
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
Problem does not seem to occur when the command is run via commanditems.Sub Zoom2SelectedFeature()Dim pdoc As IMxDocumentDim pmap As IMapDim player As IFeatureLayerDim pFC As IFeatureClassSet pdoc = ThisDocumentSet pmap = pdoc.FocusMapSet player = pmap.layer(0)Set pFC = player.FeatureClassDim pQF As IQueryFilterSet pQF = New QueryFilterpQF.WhereClause = "OBJECTID = 29" ' change this to suit your query needsDim pFS As IFeatureSelectionSet pFS = playerpFS.SelectFeatures pQF, esriSelectionResultEnum.esriSelectionResultNew, FalseDim pUID As New UIDDim pCmdItem As ICommandItempUID.Value = "esriArcMapUI.ZoomToSelectedCommand"Dim document As IDocumentSet document = Application.documentSet pCmdItem = document.CommandBars.Find(pUID)pCmdItem.ExecuteEnd Sub