Not able to plot in AUTOCAD 2021, when BACKGROUNDPLOT system variable set to '0'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In AutoCAD 2021 not able to plot when system variable "BACKGROUNDPLOT" is set to '0'. Showing error in plot and publish details dialogue "Layout not found". In other AutoCAD versions it is working. Before starting the plotting/publishing I am setting system variable "BACKGROUNDPLOT" value to '0'. Why it is happening with AutoCAD 2021 only and not for other AutoCAD versions when system variable "BACKGROUNDPLOT" is set to '0'? Please give solution on it.
[CommandMethod("plotTest")]
static public void plotTest()
{
short bgPlot =
(short)Application.GetSystemVariable("BACKGROUNDPLOT");
//set the BACKGROUNDPLOT = 0 temporarily.
Application.SetSystemVariable("BACKGROUNDPLOT", 0);
//
//
// plotting API calls
//
//
//re-set the original value of BACKGROUNDPLOT.
Application.SetSystemVariable("BACKGROUNDPLOT",
bgPlot);
}