Not able to plot in AUTOCAD 2021, when BACKGROUNDPLOT system variable set to '0'.

Not able to plot in AUTOCAD 2021, when BACKGROUNDPLOT system variable set to '0'.

Anonymous
Not applicable
1,698 Views
4 Replies
Message 1 of 5

Not able to plot in AUTOCAD 2021, when BACKGROUNDPLOT system variable set to '0'.

Anonymous
Not applicable

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);

}

0 Likes
1,699 Views
4 Replies
Replies (4)
Message 2 of 5

tbrammer
Advisor
Advisor

The code seems to be C#.

  • if it is an API question, you should post it to the .NET forum.
  • if it is a general AutoCAD plotting question, you should post it to the general AutoCAD forum.

@Anonymous wrote:

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.


Are you sure that the problem is related to BACKGROUNDPLOT? Does it work with BACKGROUNDPLOT=1?

Your code doesn't show the actual API calls. Are you sure that the layout that you are going to plot exists in the drawing? Did you test your code with the same drawing in both AutoCAD versions? Does plotting work if you start it regularly via PLOT command?

 

It would be helpful if you include a small buildable sample project and the DWG to reproduce the problem (->.NET forum!)


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

0 Likes
Message 3 of 5

Anonymous
Not applicable

.

0 Likes
Message 4 of 5

Anonymous
Not applicable

Ok Sir...I will post this issue to .NET forum also.  I am sure that problem is related to BACKGROUNDPLOT. It is working with BACKGROUNDPLOT= 1. Yes sir layouts are exist in the drawing. I haven't posted APIs calls part on forum. I have tested my code in 13 and 15 AutoCAD versions it is working when BACKGROUNDPLOT set to 0.

0 Likes
Message 5 of 5

Anonymous
Not applicable

 Sir It is not working with BACKGROUNDPLOT= 1 also.

0 Likes