IFeatureExtent Interface Problem
Spent a long while today doing alot of work with the IFeatureExtent interface.
Its typical use is for zooming to a selected features of a layer.
Well I started off running into some very weird problems. I initially had this working on the prototype version of this particular project.Now that we are into full development phase the code had to be upgraded to production quality and altered to fit into our framework to support our own interfaces!.
There was also a new MXD that was created, with updated imagery. Thats looking really nice!.
Here comes the intresting problem. Suddenly my zoom to selected feature code does not work. Its selects the feature fine, but it does not zoom. I found this weird. Double checked the code over and over again but couldnt really find out why!. So I decided to test my old MXD, and guess what?. Its works. So im really confused!.
While trying to debug I ran into a possible bug with the IFeatureExtent Interface. If you try and view the extent by doing the following for example:
Dim t_MapArea as IMapArea = FeatureExtent
Then watch the t_MapArea, you will notice that the extent has thrown as exception?.
The worse thing is that its throwing me “Unspecified error”, which really means nothing, so it makes it hard to debug. Looks like an error in the .NET ADF, but I will check this with the guys in Redlands soon
. I also tested it on many other MXD’s and same probem.
Still havent solved my bizzare issue, so im having the SDE guys check out the difference’s between the MXD’s for me, will see what happens!

