I am writing an application where one of the things it does is create a point then creates buffer (which is a graphic) at the specific point, what I want to do is when the buffer has been created, is to zoom to the extent of the buffer.
I have tried the following code but it doesn't seem to work
Dim penv2 As IEnvelope
Set penv2 = New Envelope
Set penv2 = pActiveView.extent
Dim pArea As IArea
Set pArea = pElement.Geometry.Envelope
penv2.CenterAt pArea.Centroid
pActiveView.Refresh
I've also tried
Dim penv2 As IEnvelope
Set penv2 = pElement.Geometry.Envelope
pActiveView.Extent = penv2
pActiveView.Refresh
But nothing happens. Any ideas on where I am going wrong?
Thanks