just found a workaround:I switch to the dataView and set the center point of the extent there (using the following code), then switch back to the LayoutView: Dim centerPoint As IPoint centerPoint = New ESRI.ArcGIS.Geometry.Point centerPoint.PutCoords((left_x + right_x) / 2, (upper_y + lower_y) / 2) Dim activeView As IActiveView activeView = pMxDoc.ActiveView ' get the active view�??s extent Dim ext As IEnvelope ext = activeView.Extent ' set extent center point: ext.CenterAt(centerPoint) ' set the extent activeView.Extent = ext activeView.Refresh()Cheers,Johannes
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.