IInvalidArea2 does not work?

Discussion created by agimbits on Nov 29, 2011
Latest reply on Dec 1, 2011 by agimbits
Hello all!

I am developing an editing tool and wish to refresh user's display that user can see immediately results. In the tutorials i was looking at say i should use IInvalidArea2 object. So i did:

#define IInvalidArea2 object
private IInvalidArea2 m_refreshArea;

#some code here

#add envelopes of my geometries (i am going geomentries in loop, so this line would be called many times)

#in the end 
m_refreshArea.Display = m_editor.Display;

but... nothing really happens

After playing with IInvalidArea and googling, i did not find anything better but to use...

private IEnvelope m_editedFeature;

#some code here

#add envelopes

#at the end
IActiveView activeView = m_editor.Map as IActiveView;
                            (m_editor.Map as IActiveView).PartialRefresh(esriViewDrawPhase.esriViewGeography,
                                                      (m_editor as IEditLayers).CurrentLayer,

This works perfectly!
But why IInvalidArea does not work???
(according to tutorials it is the default way to refresh dispay).

p.s. I am using C# ArcObjects, Arc10, VS10
p.p.s I also tried IInvalidArea3 instead of 2nd version, the same effect - nothing is refreshed...