Recently, I received questions from couple of developers on identifying the plotting state during overrule. Though the context of questions were different (like one developer wanted to avoid doing draw overrule during plot and other wanted kind of applying plot stamp) I felt I need to make the solution as blog. To identify the plotting state, use “Context.IsPlotGeneration” as shown in below code
public override bool WorldDraw(Autodesk.AutoCAD.GraphicsInterface.Drawable drawable, Autodesk.AutoCAD.GraphicsInterface.WorldDraw wd) { if (wd.Context.IsPlotGeneration) { //code while ploting } else { //code while not ploting } return base.WorldDraw(drawable, wd); }