<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Plot to file (eNoMatchingMedia error) in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/plot-to-file-enomatchingmedia-error/m-p/1678578#M23378</link>
    <description>Hi!&lt;BR /&gt;
I managed to solve this problem.&lt;BR /&gt;
ObjectARX manula says:&lt;BR /&gt;
&lt;BR /&gt;
"If a device override is applied, it supercedes the device in the layout and the device in the AcDbPlotSettings overrides object".&lt;BR /&gt;
&lt;BR /&gt;
Well, it supercedes the device, but only device... Media list remains the same as in AcDbPlotSettings.&lt;BR /&gt;
So i removed overrideSettings() and now it passes validation.&lt;BR /&gt;
But afrer reaching sDWG_PlotEngine-&amp;gt;beginPage AutoCAD crashes with error:&lt;BR /&gt;
&lt;BR /&gt;
INTERNAL ERROR: dbplotset.cpp@422: eLockViolation&lt;BR /&gt;
&lt;BR /&gt;
Here is part of the code (error checkin ommited):&lt;BR /&gt;
&lt;BR /&gt;
const ACHAR * defaultPlotDeviceName = _T("DWF6 ePlot.pc3");&lt;BR /&gt;
	const ACHAR * defaultPlotDeviceFullPath = NULL;&lt;BR /&gt;
	AcPlPlotInfo *sDWG_pPlotInfo = new AcPlPlotInfo ();&lt;BR /&gt;
	sDWG_pPlotInfo-&amp;gt;setLayout (sDWG_LayoutId);&lt;BR /&gt;
	AcPlPlotConfig *sDWG_pPlotConfig = NULL;&lt;BR /&gt;
	es = acplPlotConfigManagerPtr()-&amp;gt;setCurrentConfig (sDWG_pPlotConfig, defaultPlotDeviceName);&lt;BR /&gt;
	sDWG_pPlotConfig-&amp;gt;setPlotToFile (true);&lt;BR /&gt;
	sDWG_pPlotConfig-&amp;gt;refreshMediaNameList ();&lt;BR /&gt;
	sDWG_pPlotInfo-&amp;gt;setDeviceOverride (sDWG_pPlotConfig);&lt;BR /&gt;
&lt;BR /&gt;
	AcPlPlotPageInfo *sDWG_pPlotPageInfo = new AcPlPlotPageInfo ();&lt;BR /&gt;
	AcPlPlotInfoValidator *sDWG_pPlotInfoValidator = new AcPlPlotInfoValidator ();&lt;BR /&gt;
	&lt;BR /&gt;
	es = sDWG_pPlotInfoValidator-&amp;gt;validate (*sDWG_pPlotInfo);&lt;BR /&gt;
	AcPlPlotFactory *sDWG_PlotFactory = new AcPlPlotFactory ();&lt;BR /&gt;
	AcPlPlotEngine *sDWG_PlotEngine;&lt;BR /&gt;
	es = sDWG_PlotFactory-&amp;gt;createPublishEngine (sDWG_PlotEngine);&lt;BR /&gt;
	//Plotowanie&lt;BR /&gt;
	//&lt;BR /&gt;
	es = sDWG_PlotEngine-&amp;gt;beginPlot (NULL, NULL);&lt;BR /&gt;
	es = sDWG_PlotEngine-&amp;gt;beginDocument (*sDWG_pPlotInfo, sDWG_pDocument-&amp;gt;fileName(), NULL, 1, true, sourceDWF);	&lt;BR /&gt;
	es = sDWG_PlotEngine-&amp;gt;beginPage (*sDWG_pPlotPageInfo, *sDWG_pPlotInfo, false, NULL);&lt;BR /&gt;
	es = sDWG_PlotEngine-&amp;gt;beginGenerateGraphics ();&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;endGenerateGraphics ();&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;endPage ();&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;endDocument ();&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;endPlot ();&lt;BR /&gt;
&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;destroy ();&lt;BR /&gt;
	delete sDWG_pPlotConfig;&lt;BR /&gt;
&lt;BR /&gt;
What is wrong here??&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Aleksander Wons</description>
    <pubDate>Sat, 17 Jun 2006 11:17:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-06-17T11:17:30Z</dc:date>
    <item>
      <title>Plot to file (eNoMatchingMedia error)</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/plot-to-file-enomatchingmedia-error/m-p/1678577#M23377</link>
      <description>Hi!&lt;BR /&gt;
(AutoCAD 2007, ObjectARX 2007, VS2005)&lt;BR /&gt;
&lt;BR /&gt;
I'm trying to plot DWG to file.&lt;BR /&gt;
I choose "DWF6 ePlot.pc3" as device and set plot type to kExtends. And I'm plotting model.&lt;BR /&gt;
Everythin works fine, but when I try to validate my AcPlPlotInfo object It returns with eNoMatchingMedia error.&lt;BR /&gt;
&lt;BR /&gt;
When I call getLocaleMediaName() on validator I get A4 media.&lt;BR /&gt;
&lt;BR /&gt;
Does anybody know why this error occurs, or maybe there are some requirements I have to meet to be able to plot to file?&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
 Aleksander Wons</description>
      <pubDate>Fri, 16 Jun 2006 20:32:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/plot-to-file-enomatchingmedia-error/m-p/1678577#M23377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-16T20:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: Plot to file (eNoMatchingMedia error)</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/plot-to-file-enomatchingmedia-error/m-p/1678578#M23378</link>
      <description>Hi!&lt;BR /&gt;
I managed to solve this problem.&lt;BR /&gt;
ObjectARX manula says:&lt;BR /&gt;
&lt;BR /&gt;
"If a device override is applied, it supercedes the device in the layout and the device in the AcDbPlotSettings overrides object".&lt;BR /&gt;
&lt;BR /&gt;
Well, it supercedes the device, but only device... Media list remains the same as in AcDbPlotSettings.&lt;BR /&gt;
So i removed overrideSettings() and now it passes validation.&lt;BR /&gt;
But afrer reaching sDWG_PlotEngine-&amp;gt;beginPage AutoCAD crashes with error:&lt;BR /&gt;
&lt;BR /&gt;
INTERNAL ERROR: dbplotset.cpp@422: eLockViolation&lt;BR /&gt;
&lt;BR /&gt;
Here is part of the code (error checkin ommited):&lt;BR /&gt;
&lt;BR /&gt;
const ACHAR * defaultPlotDeviceName = _T("DWF6 ePlot.pc3");&lt;BR /&gt;
	const ACHAR * defaultPlotDeviceFullPath = NULL;&lt;BR /&gt;
	AcPlPlotInfo *sDWG_pPlotInfo = new AcPlPlotInfo ();&lt;BR /&gt;
	sDWG_pPlotInfo-&amp;gt;setLayout (sDWG_LayoutId);&lt;BR /&gt;
	AcPlPlotConfig *sDWG_pPlotConfig = NULL;&lt;BR /&gt;
	es = acplPlotConfigManagerPtr()-&amp;gt;setCurrentConfig (sDWG_pPlotConfig, defaultPlotDeviceName);&lt;BR /&gt;
	sDWG_pPlotConfig-&amp;gt;setPlotToFile (true);&lt;BR /&gt;
	sDWG_pPlotConfig-&amp;gt;refreshMediaNameList ();&lt;BR /&gt;
	sDWG_pPlotInfo-&amp;gt;setDeviceOverride (sDWG_pPlotConfig);&lt;BR /&gt;
&lt;BR /&gt;
	AcPlPlotPageInfo *sDWG_pPlotPageInfo = new AcPlPlotPageInfo ();&lt;BR /&gt;
	AcPlPlotInfoValidator *sDWG_pPlotInfoValidator = new AcPlPlotInfoValidator ();&lt;BR /&gt;
	&lt;BR /&gt;
	es = sDWG_pPlotInfoValidator-&amp;gt;validate (*sDWG_pPlotInfo);&lt;BR /&gt;
	AcPlPlotFactory *sDWG_PlotFactory = new AcPlPlotFactory ();&lt;BR /&gt;
	AcPlPlotEngine *sDWG_PlotEngine;&lt;BR /&gt;
	es = sDWG_PlotFactory-&amp;gt;createPublishEngine (sDWG_PlotEngine);&lt;BR /&gt;
	//Plotowanie&lt;BR /&gt;
	//&lt;BR /&gt;
	es = sDWG_PlotEngine-&amp;gt;beginPlot (NULL, NULL);&lt;BR /&gt;
	es = sDWG_PlotEngine-&amp;gt;beginDocument (*sDWG_pPlotInfo, sDWG_pDocument-&amp;gt;fileName(), NULL, 1, true, sourceDWF);	&lt;BR /&gt;
	es = sDWG_PlotEngine-&amp;gt;beginPage (*sDWG_pPlotPageInfo, *sDWG_pPlotInfo, false, NULL);&lt;BR /&gt;
	es = sDWG_PlotEngine-&amp;gt;beginGenerateGraphics ();&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;endGenerateGraphics ();&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;endPage ();&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;endDocument ();&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;endPlot ();&lt;BR /&gt;
&lt;BR /&gt;
	sDWG_PlotEngine-&amp;gt;destroy ();&lt;BR /&gt;
	delete sDWG_pPlotConfig;&lt;BR /&gt;
&lt;BR /&gt;
What is wrong here??&lt;BR /&gt;
&lt;BR /&gt;
Best regards,&lt;BR /&gt;
Aleksander Wons</description>
      <pubDate>Sat, 17 Jun 2006 11:17:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/plot-to-file-enomatchingmedia-error/m-p/1678578#M23378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-06-17T11:17:30Z</dc:date>
    </item>
  </channel>
</rss>

