laptop and a wrench

Bug

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.

Last Published: August 25, 2014 ArcGIS for Desktop
Bug ID Number NIM046716
SubmittedJuly 7, 2009
Last ModifiedJune 5, 2024
Applies toArcGIS for Desktop
Version found9.3.1
Operating SystemWindows OS
Operating System VersionXP
Version Fixed10
StatusFixed

Workaround

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

Steps to Reproduce

Bug ID: NIM046716

Software:

  • ArcGIS for Desktop

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options