activeView.Extent = layer.AreaOfInterest;
activeView.Refresh();
Imap.get_Layers()
layer.AreaOfInterest
ArcMap.Document.ActiveView
public static void zoomTo(IEnvelope extent, IActiveView activeView)
{
activeView.Extent = extent;
activeView.Refresh();
}
Sub ZoomToLayer()
Dim mxDoc As IMxDocument
Set mxDoc = ThisDocument
Dim layer As IFeatureLayer
Set layer = mxDoc.SelectedLayer
mxDoc.CurrentContentsView.ContextItem = layer
Dim uid As uid
Set uid = New uid
uid.Value = "{18DF94D9-0F8A-11D2-94B1-080009EEBECB}:7"
Dim commandItem As ICommandItem
Set commandItem = Application.Document.CommandBars.Find(uid)
commandItem.Execute
End Sub
For whoever having similar problem, IGeodataSet.Extent (http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0025000003m6000000 ) might be interesting
To update the extent, we can use IFeatureClassManage.UpdateExtent (http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/IFeatureClassManage_Int... )