Most common issue developer’s face during plotting/publishing the drawing through API is of back ground plotting/publishing. Developers expect call to plot/publish API, should finish the plot/publish and return. But the finishing of plotting/publishing in AutoCAD depends on system variable BACKGROUNDPLOT. During background plotting/publish a background process is started to plot/publish the drawing. So, to avoid this starting of background process, Developers need to set the value of BACKGROUNDPLOT to 0 temporarily before starting the plotting/publishing through API as shown in below.
static public void plotTest()
short bgPlot =
//set the BACKGROUNDPLOT = 0 temporarily.
// plotting API calls
//re-set the original value of BACKGROUNDPLOT.