You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects Mapping forum

Highlight selected feature   Sebastian Rossi Nov 18, 2009
Re: Highlight selected feature   Nir Yoscovitz Nov 19, 2009
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Highlight selected feature 
Author Sebastian Rossi 
Date Nov 18, 2009 
Message Hi everyone.
I'd selected an IFeature object and I want to highlight it on the map. Basically, show like a flash on the map over that feature.

Does anyone know how to do it?

thanks!

Seba 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Highlight selected feature 
Author Nir Yoscovitz 
Date Nov 19, 2009 
Message Hi Sebastian,

You can use IIdentifyObj.Flash method.

Regards,
Nir 
 
IFeatureLayer FLayer;
IFeature pFeature;
IQueryFilter Qf = new QueryFilterClass();
IFeatureCursor FCursor;

FLayer = (IFeatureLayer)m_document.FocusMap.get_Layer(0);
FCursor = FLayer.FeatureClass.Search(Qf, false);
pFeature = FCursor.NextFeature();
m_document.ContextItem = pFeature;

IArray arr = ((IIdentify)FLayer).Identify(pFeature.Shape);
IFeatureIdentifyObj fio = (IFeatureIdentifyObj)arr.get_Element(0);
fio.Feature = pFeature;
m_document.ContextItem = fio;
((IIdentifyObj)fio).Flash(m_document.ActiveView.ScreenDisplay);