Search code examples
.netvbaautocadautocad-plugin

Error IAutocadPlotFailed - Plotter runs async


I get the error IAutocadPlotFailed inside Autocad VBA macro. My code iterates over a collection of drawings and plots and saves them to png. I have managed to narrow down the error to being that the plotting mechanism run async.

Due to being able to have only one instance of the Plotting mechanism, if code moves faster than the Plot. It prints an error.

Is there any way that the plot can run in sync with the app?

Meaning if i call the plotting mechanism inside Autocad to wait until it calls the next plot.


Solution

  • The BACKGROUNDPLOT system variable determines whether background plotting is turned on or off for plotting and publishing (except when the plot is issued from an AutoCAD Script file); if background plotting is enabled, the plotting jobs will be processed asynchronously using a separate thread.

    If you set this system variable to 0, all plotting jobs will be processed in the foreground.