Dear Sandhya Yamarthi,
Can you please tell me how to call the following code...
using System.Runtime.InteropServices;
namespace Project1
{
class Class1
{
[DllImport("kernel32.dll")]
static extern void Sleep(uint dwMilliseconds);
public void FlashFeature(IFeature Feature, IMxDocument MxDoc)
{
try
{
MxDoc.ActiveView.ScreenDisplay.StartDrawing(0, (short)(esriScreenCache.esriNoScreenCache));
switch (Feature.Shape.GeometryType)
{
case (esriGeometryType.esriGeometryPolyline):
{
FlashLine(MxDoc.ActiveView.ScreenDisplay, Feature.Shape);
break;
}
case (esriGeometryType.esriGeometryPolygon):
{
FlashPolygon(MxDoc.ActiveView.ScreenDisplay, Feature.Shape);
break;
}
case (esriGeometryType.esriGeometryPoint):
{
FlashPoint(MxDoc.ActiveView.ScreenDisplay, Feature.Shape);
break;
}
}
MxDoc.ActiveView.ScreenDisplay.FinishDrawing();
}
catch (Exception Err)
{
MessageBox.Show("Error : " + Err.Message);
}
}
public void FlashLine(IScreenDisplay Display, IGeometry Geometry)
{
ISimpleLineSymbol LineSymbol;
ISymbol Symbol;
IRgbColor RgbColor;
try
{
LineSymbol = new SimpleLineSymbolClass();
LineSymbol.Width = 4;
RgbColor = new RgbColorClass();
RgbColor.Green = 128;
Symbol = (ISymbol)LineSymbol;
Symbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
Display.SetSymbol((ISymbol)(LineSymbol));
Display.DrawPolyline(Geometry);
Sleep(300);
Display.DrawPolyline(Geometry);
}
catch (Exception Err)
{
LogFile.WriteLog("Error at : " + Err.Message);
}
}
public void FlashPolygon(IScreenDisplay Display, IGeometry Geometry)
{
ISimpleFillSymbol FillSymbol;
ISymbol Symbol;
IRgbColor RgbColor;
try
{
FillSymbol = new SimpleFillSymbolClass();
FillSymbol.Outline = null;
RgbColor = new RgbColorClass();
RgbColor.Green = 128;
Symbol = (ISymbol)FillSymbol;
Symbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
Display.SetSymbol((ISymbol)(FillSymbol));
Display.DrawPolygon(Geometry);
Sleep(300);
Display.DrawPolygon(Geometry);
}
catch (Exception Err)
{
LogFile.WriteLog("Error at : " + Err.Message);
}
}
public void FlashPoint(IScreenDisplay Display, IGeometry Geometry)
{
ISimpleMarkerSymbol MarkerSymbol;
ISymbol Symbol;
IRgbColor RgbColor;
try
{
MarkerSymbol = new SimpleMarkerSymbolClass();
MarkerSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;
RgbColor = new RgbColorClass();
RgbColor.Green = 128;
Symbol = (ISymbol)MarkerSymbol;
Symbol.ROP2 = esriRasterOpCode.esriROPNotXOrPen;
Display.SetSymbol((ISymbol)MarkerSymbol);
Display.DrawPoint(Geometry);
Sleep(300);
Display.DrawPoint(Geometry);
}
catch (Exception Err)
{
LogFile.WriteLog("Error : " + Err.Message);
}
}
}
}
I have already post my code..
Thanks for your valuable time and consideration...
Waiting for your reply..