<?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: AccessViolationException for PublishExecute in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3481856#M55287</link>
    <description>&lt;P&gt;I have never used publish or sheet sets in .net.&amp;nbsp; You can&amp;nbsp;read more&amp;nbsp;&lt;A href="http://msdn.microsoft.com/en-us/library/system.accessviolationexception.aspx" target="_self"&gt;&amp;gt;&amp;gt;here&amp;lt;&amp;lt;.&lt;/A&gt;&amp;nbsp;&amp;nbsp;If you add a try/catch you should get&amp;nbsp;more detailed exception information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My 1st guess&amp;nbsp;would be&amp;nbsp;access to the&amp;nbsp;pc3 file.&amp;nbsp; Check to&amp;nbsp;make the sure the client has&amp;nbsp;access to (example is Map 3d 2011 on&amp;nbsp;Win 7 Pro x64) C:\Users\"username"\AppData\Roaming\Autodesk\AutoCAD Map 3D 2011\R18.1\enu\Plotters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you wanted to try moving the pc3 file to a folder you know the user has full access to, you can add a shortcut to the path you want to use in the folder above.&amp;nbsp; In other words, autocad will find PC3 files in an alternate path if a shortcut to that path is found in the folder specified in&amp;nbsp;Options-&amp;gt;Files-&amp;gt;Printer Support File Path-&amp;gt;Printer Configuration Search Path.&amp;nbsp; You have to do the same with the associated PMP file.&amp;nbsp; We use this approach but we also rename the PC3 &amp;amp; PMP files.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Jun 2012 17:37:26 GMT</pubDate>
    <dc:creator>fieldguy</dc:creator>
    <dc:date>2012-06-01T17:37:26Z</dc:date>
    <item>
      <title>AccessViolationException for PublishExecute</title>
      <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3481512#M55286</link>
      <description>&lt;P class="p1"&gt;I have created a batch publishing plugin that is causing the following error:&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;AccessViolationException:&amp;nbsp;&lt;SPAN&gt;Attempted to read or write protected memory. This is often an indication that other memory is corrupt.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;The execption occurs at PublishExecute in the following abbreviated code snippet:&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;DsdData&amp;nbsp;&lt;SPAN&gt;dsdd =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;new&lt;/SPAN&gt;DsdData&lt;SPAN&gt;();&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p2"&gt;dsdd.ReadDsd(dsdFile);&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN&gt;Publisher&lt;/SPAN&gt; publisher = &lt;SPAN&gt;Application&lt;/SPAN&gt;.Publisher;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN&gt;PlotConfig&lt;/SPAN&gt; pc =&amp;nbsp;&lt;SPAN&gt;PlotConfigManager&lt;/SPAN&gt;.SetCurrentConfig(&lt;SPAN&gt;"DWG To PDF.pc3"&lt;/SPAN&gt;);&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;publisher.PublishExecute(dsdd, pc);&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;This error does NOT occur in my development environment - AutoCAD 2010, Window XP, 32-bit. &amp;nbsp;It does occur on a customers machine - AutoCAD 2011, Win7, 64-bit.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;Any ideas on what I need to change to solve this problem? &amp;nbsp;Any help would be greatly appreciated.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2012 15:18:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3481512#M55286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-01T15:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException for PublishExecute</title>
      <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3481856#M55287</link>
      <description>&lt;P&gt;I have never used publish or sheet sets in .net.&amp;nbsp; You can&amp;nbsp;read more&amp;nbsp;&lt;A href="http://msdn.microsoft.com/en-us/library/system.accessviolationexception.aspx" target="_self"&gt;&amp;gt;&amp;gt;here&amp;lt;&amp;lt;.&lt;/A&gt;&amp;nbsp;&amp;nbsp;If you add a try/catch you should get&amp;nbsp;more detailed exception information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My 1st guess&amp;nbsp;would be&amp;nbsp;access to the&amp;nbsp;pc3 file.&amp;nbsp; Check to&amp;nbsp;make the sure the client has&amp;nbsp;access to (example is Map 3d 2011 on&amp;nbsp;Win 7 Pro x64) C:\Users\"username"\AppData\Roaming\Autodesk\AutoCAD Map 3D 2011\R18.1\enu\Plotters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you wanted to try moving the pc3 file to a folder you know the user has full access to, you can add a shortcut to the path you want to use in the folder above.&amp;nbsp; In other words, autocad will find PC3 files in an alternate path if a shortcut to that path is found in the folder specified in&amp;nbsp;Options-&amp;gt;Files-&amp;gt;Printer Support File Path-&amp;gt;Printer Configuration Search Path.&amp;nbsp; You have to do the same with the associated PMP file.&amp;nbsp; We use this approach but we also rename the PC3 &amp;amp; PMP files.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2012 17:37:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3481856#M55287</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2012-06-01T17:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException for PublishExecute</title>
      <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3481984#M55288</link>
      <description>&lt;P&gt;I should have mentioned that the error is not constant. &amp;nbsp;Sometimes the publishing works and no error is thrown. &amp;nbsp;I would say that the error occurs greater than 50% of the time. &amp;nbsp;Since it works sometimes I assume that would mean it isn't likely to be related to the pc3 file but I will investigate it.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2012 18:46:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3481984#M55288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-01T18:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException for PublishExecute</title>
      <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3482164#M55289</link>
      <description>&lt;P&gt;Are you using&amp;nbsp;"backgroundplot"&amp;nbsp;= 0?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Autodesk.Autocad.ApplicationServices.Application.SetSystemVariable("BACKGROUNDPLOT", 0) sets plot and publish to foreground.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2012 20:53:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3482164#M55289</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2012-06-01T20:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException for PublishExecute</title>
      <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3482168#M55290</link>
      <description>&lt;P&gt;Yes&lt;/P&gt;</description>
      <pubDate>Fri, 01 Jun 2012 20:56:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3482168#M55290</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-01T20:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException for PublishExecute</title>
      <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3483024#M55291</link>
      <description>&lt;P&gt;I have determined that this error only occurs when I netload the plugin dll into AutoCAD from a standalong application that is connected to AutoCAD. &amp;nbsp;If I manually open AutoCAD, netload the plugin, the PublishExecute works without an issue. &amp;nbsp;What is affected by the fact that I am controlling AutoCAD from a standalong application?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Jun 2012 18:37:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3483024#M55291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-06-03T18:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException for PublishExecute</title>
      <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3483844#M55292</link>
      <description>&lt;P&gt;You will have to search here.&amp;nbsp;&amp;nbsp;External access uses COM and internal access uses .NET.&amp;nbsp; I have not&amp;nbsp;created any standalone exe that accesses autocad.&amp;nbsp; There is a link &lt;A href="https://forums.autodesk.com/t5/NET/Sharing-DLL-with-ACAD-and-Standalone-exe/m-p/1901454/highlight/true#M6340" target="_self"&gt;&amp;gt;&amp;gt;here&amp;lt;&amp;lt;.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are several discussions in this forum on standalone vs internal, com vs. net, exe and&amp;nbsp;dll, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is mixing managed api (internal) like acmgd, and acdmgd with external (com).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2012 14:59:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/3483844#M55292</guid>
      <dc:creator>fieldguy</dc:creator>
      <dc:date>2012-06-04T14:59:47Z</dc:date>
    </item>
    <item>
      <title>Re: AccessViolationException for PublishExecute</title>
      <link>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/4472863#M55293</link>
      <description>&lt;P&gt;Did you ever resolve your issue?&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2013 18:41:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/accessviolationexception-for-publishexecute/m-p/4472863#M55293</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-09-30T18:41:27Z</dc:date>
    </item>
  </channel>
</rss>

