<?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: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ??? in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632691#M67044</link>
    <description>I gave it another fresh try, earlier today to the code: &lt;BR /&gt;
OffscreenImageCreation.cs&lt;BR /&gt;
&lt;BR /&gt;
And found the problem and fixed it... it is the View view = new View(); &lt;BR /&gt;
call - what's it is interesting is why on later version the original code &lt;BR /&gt;
works as-is, and why the first use of the command OSS works, did not went in &lt;BR /&gt;
deep into that.&lt;BR /&gt;
&lt;BR /&gt;
The solution that works here it is:&lt;BR /&gt;
&lt;BR /&gt;
1. - You can get rid off basically all the using's calls  - in my case I &lt;BR /&gt;
removed all of them&lt;BR /&gt;
2. - Then start a transaction to wrap all the calls after this line:&lt;BR /&gt;
int vpn = System.Convert.ToInt32(Application.GetSystemVariable("CVPORT"));&lt;BR /&gt;
&lt;BR /&gt;
3. Make use of one Drawable object - in my case I used the BTR - model &lt;BR /&gt;
space - the same one it is use on the sample.&lt;BR /&gt;
&lt;BR /&gt;
4. Instead of the use of View view = new View();&lt;BR /&gt;
&lt;BR /&gt;
Replace it with:&lt;BR /&gt;
&lt;BR /&gt;
View view = gsm.CreateAutoCADView(btr); // or your own Drawable - temp.&lt;BR /&gt;
&lt;BR /&gt;
5. Then do the commit at the end of the using:&lt;BR /&gt;
&lt;BR /&gt;
 tr.Commit();&lt;BR /&gt;
&lt;BR /&gt;
And should work - I don't get any crash anymore - on all my tests here - did &lt;BR /&gt;
not tested under a later AutoCAD version but I think it will work too.&lt;BR /&gt;
&lt;BR /&gt;
See if helps.&lt;BR /&gt;
&lt;BR /&gt;
//--&lt;BR /&gt;
"Tony Tanzillo"&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed,&lt;BR /&gt;
&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
You imply to be well-informed when someone who is much&lt;BR /&gt;
more well-informed than yourself correctly points out an error&lt;BR /&gt;
in your code (allowing a transaction to abort), and you just&lt;BR /&gt;
blow them off, as if you already know better.&lt;BR /&gt;
&lt;BR /&gt;
But, please don't let this keep you from undertaking further&lt;BR /&gt;
excercises in self-humiliation, as I'm sure they'll instill great&lt;BR /&gt;
confidence in those whom you are trying to peddling the&lt;BR /&gt;
result of your learning excises to.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message&lt;BR /&gt;
news:6336193@discussion.autodesk.com...&lt;BR /&gt;
Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You're not nearly as well-informed as you seem to think ...&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed, but I can say "Getting a little&lt;BR /&gt;
better every day!"&lt;BR /&gt;
&lt;BR /&gt;
Terry&lt;/NOSPAM&gt;</description>
    <pubDate>Sun, 14 Feb 2010 18:14:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-02-14T18:14:23Z</dc:date>
    <item>
      <title>CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632674#M67027</link>
      <description>I have a function (based largely on an ADN example 'Play2') that fails &lt;BR /&gt;
in certain conditions on 2007/2008 but seems to work fine on 2009+.  It &lt;BR /&gt;
takes a block name and resolution parameters and returns a system bitmap.&lt;BR /&gt;
&lt;BR /&gt;
The error is:&lt;BR /&gt;
--------------------------------------------------&lt;BR /&gt;
Runtime Error!&lt;BR /&gt;
Program: C:\Program Files\AutoCAD 2008\acad.exe&lt;BR /&gt;
&lt;BR /&gt;
R6025&lt;BR /&gt;
- pure virtual function call&lt;BR /&gt;
--------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
When you open a drawing and call this function (even numerous times) &lt;BR /&gt;
everything works fine.  However if you close and reopen the same drawing &lt;BR /&gt;
(on 2007/2008) the error occurs immediately on the first call.  Is there &lt;BR /&gt;
possibly something being disposed that shouldn't be, etc.  The fact that &lt;BR /&gt;
it appears to work continuously on 2009+ leads me to suspect something &lt;BR /&gt;
may have been fixed in AutoCAD?&lt;BR /&gt;
&lt;BR /&gt;
The code attached is the exact function used, it should be usable and &lt;BR /&gt;
standalone fairly well with one exception, substitute reasonable &lt;BR /&gt;
coordinates for "AcdVue.ZoomExtents".&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Fri, 12 Feb 2010 17:57:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632674#M67027</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-12T17:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632675#M67028</link>
      <description>Since the text file attachment didn't work well, how about pasted inline &lt;BR /&gt;
in the message.&lt;BR /&gt;
&lt;BR /&gt;
   Function BlockImage(ByVal BlkNam As String, ByVal UseWid As Integer, &lt;BR /&gt;
ByVal UseHgt As Integer, Optional ByVal BufFac As Double = 1.1) As Bitmap&lt;BR /&gt;
     Dim RetBmp As New Bitmap(1, 1)&lt;BR /&gt;
     Dim BlkPts As List(Of PointXYZ) = BlockExtents(BlkNam)&lt;BR /&gt;
     Dim GraMan As GraphicsSystem.Manager = &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.GraphicsManager&lt;BR /&gt;
     Using DatBas As Database = &lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
       Using TrnAct As Transaction = &lt;BR /&gt;
DatBas.TransactionManager.StartTransaction&lt;BR /&gt;
         Using BlkTbl As BlockTable = &lt;BR /&gt;
DatBas.BlockTableId.GetObject(OpenMode.ForRead)&lt;BR /&gt;
           Using AcdDev As GraphicsSystem.Device = &lt;BR /&gt;
GraMan.CreateAutoCADOffScreenDevice()&lt;BR /&gt;
             Using BlkRec As BlockTableRecord = &lt;BR /&gt;
TrnAct.GetObject(BlkTbl(BlkNam), OpenMode.ForRead)&lt;BR /&gt;
               Using AcdVue As New GraphicsSystem.View()&lt;BR /&gt;
                 Using AcdMod As GraphicsSystem.Model = &lt;BR /&gt;
GraMan.CreateAutoCADModel()&lt;BR /&gt;
                   AcdDev.OnSize(New Size(UseWid + 1, UseHgt + 1))&lt;BR /&gt;
                   AcdDev.Add(AcdVue)&lt;BR /&gt;
                   AcdDev.Update()&lt;BR /&gt;
                   AcdVue.Add(BlkRec, AcdMod)&lt;BR /&gt;
                   AcdVue.ZoomExtents(PNT2P3D(BlkPts(0)), &lt;BR /&gt;
PNT2P3D(BlkPts(1)))&lt;BR /&gt;
                   AcdVue.Zoom(BufFac)&lt;BR /&gt;
                   RetBmp = AcdVue.GetSnapshot(AcdVue.Viewport)&lt;BR /&gt;
                   AcdVue.EraseAll()&lt;BR /&gt;
                   AcdDev.Erase(AcdVue)&lt;BR /&gt;
                 End Using&lt;BR /&gt;
               End Using&lt;BR /&gt;
             End Using&lt;BR /&gt;
           End Using&lt;BR /&gt;
         End Using&lt;BR /&gt;
       End Using&lt;BR /&gt;
     End Using&lt;BR /&gt;
     Return RetBmp&lt;BR /&gt;
   End Function</description>
      <pubDate>Fri, 12 Feb 2010 17:59:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632675#M67028</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-12T17:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632676#M67029</link>
      <description>I don't use/do VB.NET - wow a lot of usings calls &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Can't tested here, but where is the commit for your transaction call? for &lt;BR /&gt;
the model view - unless that is not available or required on vb.net.&lt;BR /&gt;
&lt;BR /&gt;
Maybe.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:6335800@discussion.autodesk.com...&lt;BR /&gt;
Since the text file attachment didn't work well, how about pasted inline&lt;BR /&gt;
in the message.&lt;BR /&gt;
&lt;BR /&gt;
   Function BlockImage(ByVal BlkNam As String, ByVal UseWid As Integer,&lt;BR /&gt;
ByVal UseHgt As Integer, Optional ByVal BufFac As Double = 1.1) As Bitmap&lt;BR /&gt;
     Dim RetBmp As New Bitmap(1, 1)&lt;BR /&gt;
     Dim BlkPts As List(Of PointXYZ) = BlockExtents(BlkNam)&lt;BR /&gt;
     Dim GraMan As GraphicsSystem.Manager =&lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.GraphicsManager&lt;BR /&gt;
     Using DatBas As Database =&lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
       Using TrnAct As Transaction =&lt;BR /&gt;
DatBas.TransactionManager.StartTransaction&lt;BR /&gt;
         Using BlkTbl As BlockTable =&lt;BR /&gt;
DatBas.BlockTableId.GetObject(OpenMode.ForRead)&lt;BR /&gt;
           Using AcdDev As GraphicsSystem.Device =&lt;BR /&gt;
GraMan.CreateAutoCADOffScreenDevice()&lt;BR /&gt;
             Using BlkRec As BlockTableRecord =&lt;BR /&gt;
TrnAct.GetObject(BlkTbl(BlkNam), OpenMode.ForRead)&lt;BR /&gt;
               Using AcdVue As New GraphicsSystem.View()&lt;BR /&gt;
                 Using AcdMod As GraphicsSystem.Model =&lt;BR /&gt;
GraMan.CreateAutoCADModel()&lt;BR /&gt;
                   AcdDev.OnSize(New Size(UseWid + 1, UseHgt + 1))&lt;BR /&gt;
                   AcdDev.Add(AcdVue)&lt;BR /&gt;
                   AcdDev.Update()&lt;BR /&gt;
                   AcdVue.Add(BlkRec, AcdMod)&lt;BR /&gt;
                   AcdVue.ZoomExtents(PNT2P3D(BlkPts(0)),&lt;BR /&gt;
PNT2P3D(BlkPts(1)))&lt;BR /&gt;
                   AcdVue.Zoom(BufFac)&lt;BR /&gt;
                   RetBmp = AcdVue.GetSnapshot(AcdVue.Viewport)&lt;BR /&gt;
                   AcdVue.EraseAll()&lt;BR /&gt;
                   AcdDev.Erase(AcdVue)&lt;BR /&gt;
                 End Using&lt;BR /&gt;
               End Using&lt;BR /&gt;
             End Using&lt;BR /&gt;
           End Using&lt;BR /&gt;
         End Using&lt;BR /&gt;
       End Using&lt;BR /&gt;
     End Using&lt;BR /&gt;
     Return RetBmp&lt;BR /&gt;
   End Function&lt;/NOSPAM&gt;</description>
      <pubDate>Sat, 13 Feb 2010 01:14:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632676#M67029</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T01:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632677#M67030</link>
      <description>Can you list which imports should be included? &lt;BR /&gt;
&lt;BR /&gt;
Error	1	Too many arguments to 'Public Sub New()'.&lt;BR /&gt;
Error	2	Type 'PointXYZ' is not defined.	 &lt;BR /&gt;
Error	3	Type 'GraphicsSystem.Manager' is not defined.	 &lt;BR /&gt;
Error	4	Type 'Database' is not defined.	 &lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Sat, 13 Feb 2010 06:30:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632677#M67030</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2010-02-13T06:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632678#M67031</link>
      <description>{quote}&lt;BR /&gt;
&lt;BR /&gt;
I don't use/do VB.NET - wow a lot of usings calls &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
Yes, most of which are unnecessary, but what's really amusing&lt;BR /&gt;
about that code is that all of those 'End Using' statements are&lt;BR /&gt;
replaced by a single '}' (close curly brace) in C#:&lt;BR /&gt;
&lt;BR /&gt;
      using( IDisposable first = .... )&lt;BR /&gt;
      using( IDisposable second = ...)&lt;BR /&gt;
      using( IDisposable  third = ... )&lt;BR /&gt;
      using( IDisposable  fourth  = ... )&lt;BR /&gt;
      using( IDisposable  fifth  = ... )&lt;BR /&gt;
      {&lt;BR /&gt;
           // blah blah blah...&lt;BR /&gt;
      }&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
&lt;LE&gt; wrote in message news:6336078@discussion.autodesk.com...&lt;BR /&gt;
I don't use/do VB.NET - wow a lot of usings calls &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Can't tested here, but where is the commit for your transaction call? for&lt;BR /&gt;
the model view - unless that is not available or required on vb.net.&lt;BR /&gt;
&lt;BR /&gt;
Maybe.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message&lt;BR /&gt;
news:6335800@discussion.autodesk.com...&lt;BR /&gt;
Since the text file attachment didn't work well, how about pasted inline&lt;BR /&gt;
in the message.&lt;BR /&gt;
&lt;BR /&gt;
   Function BlockImage(ByVal BlkNam As String, ByVal UseWid As Integer,&lt;BR /&gt;
ByVal UseHgt As Integer, Optional ByVal BufFac As Double = 1.1) As Bitmap&lt;BR /&gt;
     Dim RetBmp As New Bitmap(1, 1)&lt;BR /&gt;
     Dim BlkPts As List(Of PointXYZ) = BlockExtents(BlkNam)&lt;BR /&gt;
     Dim GraMan As GraphicsSystem.Manager =&lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.GraphicsManager&lt;BR /&gt;
     Using DatBas As Database =&lt;BR /&gt;
Application.DocumentManager.MdiActiveDocument.Database&lt;BR /&gt;
       Using TrnAct As Transaction =&lt;BR /&gt;
DatBas.TransactionManager.StartTransaction&lt;BR /&gt;
         Using BlkTbl As BlockTable =&lt;BR /&gt;
DatBas.BlockTableId.GetObject(OpenMode.ForRead)&lt;BR /&gt;
           Using AcdDev As GraphicsSystem.Device =&lt;BR /&gt;
GraMan.CreateAutoCADOffScreenDevice()&lt;BR /&gt;
             Using BlkRec As BlockTableRecord =&lt;BR /&gt;
TrnAct.GetObject(BlkTbl(BlkNam), OpenMode.ForRead)&lt;BR /&gt;
               Using AcdVue As New GraphicsSystem.View()&lt;BR /&gt;
                 Using AcdMod As GraphicsSystem.Model =&lt;BR /&gt;
GraMan.CreateAutoCADModel()&lt;BR /&gt;
                   AcdDev.OnSize(New Size(UseWid + 1, UseHgt + 1))&lt;BR /&gt;
                   AcdDev.Add(AcdVue)&lt;BR /&gt;
                   AcdDev.Update()&lt;BR /&gt;
                   AcdVue.Add(BlkRec, AcdMod)&lt;BR /&gt;
                   AcdVue.ZoomExtents(PNT2P3D(BlkPts(0)),&lt;BR /&gt;
PNT2P3D(BlkPts(1)))&lt;BR /&gt;
                   AcdVue.Zoom(BufFac)&lt;BR /&gt;
                   RetBmp = AcdVue.GetSnapshot(AcdVue.Viewport)&lt;BR /&gt;
                   AcdVue.EraseAll()&lt;BR /&gt;
                   AcdDev.Erase(AcdVue)&lt;BR /&gt;
                 End Using&lt;BR /&gt;
               End Using&lt;BR /&gt;
             End Using&lt;BR /&gt;
           End Using&lt;BR /&gt;
         End Using&lt;BR /&gt;
       End Using&lt;BR /&gt;
     End Using&lt;BR /&gt;
     Return RetBmp&lt;BR /&gt;
   End Function&lt;/NOSPAM&gt;&lt;/LE&gt;</description>
      <pubDate>Sat, 13 Feb 2010 11:54:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632678#M67031</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T11:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632679#M67032</link>
      <description>LE wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Can't tested here, but where is the commit for your transaction call?&lt;BR /&gt;
&amp;gt; for the model view - unless that is not available or required on&lt;BR /&gt;
&amp;gt; vb.net.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for looking at it.  There are no changes to the drawing/database&lt;BR /&gt;
they we want to commit.  Once the bitmap is obtained everything should&lt;BR /&gt;
be discarded.  A transaction abort could be added but is it really needed?&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Sat, 13 Feb 2010 13:48:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632679#M67032</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T13:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632680#M67033</link>
      <description>arcticad wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Can you list which imports should be included?&lt;BR /&gt;
&lt;BR /&gt;
This function is in a module that shares with others, so all these may&lt;BR /&gt;
not be necessary for this function.&lt;BR /&gt;
&lt;BR /&gt;
Imports Autodesk.AutoCAD&lt;BR /&gt;
Imports Autodesk.AutoCAD.Geometry&lt;BR /&gt;
Imports Autodesk.AutoCAD.EditorInput&lt;BR /&gt;
Imports Autodesk.AutoCAD.DatabaseServices&lt;BR /&gt;
Imports Autodesk.AutoCAD.ApplicationServices&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Error	2	Type 'PointXYZ' is not defined.&lt;BR /&gt;
&lt;BR /&gt;
As mentioned, substitute reasonable values for ZoomWindow.  The&lt;BR /&gt;
intention was to not bring additional functions and structures into the&lt;BR /&gt;
picture, attempting to keep it lean as possible.&lt;BR /&gt;
&lt;BR /&gt;
I know the instance of GraphicsManager should not be disposed, that's&lt;BR /&gt;
why it's defined using DIM instead.&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Sat, 13 Feb 2010 13:55:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632680#M67033</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T13:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632681#M67034</link>
      <description>Oh! I see those play2 and play3 samples ... with all the usings - calls ....&lt;BR /&gt;
&lt;BR /&gt;
I remember doing an update for one of the Kean samples that generates &lt;BR /&gt;
snapshots - but with C#, and I am very sure that I used commit... will look &lt;BR /&gt;
around.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:6336114@discussion.autodesk.com...&lt;BR /&gt;
LE wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Can't tested here, but where is the commit for your transaction call?&lt;BR /&gt;
&amp;gt; for the model view - unless that is not available or required on&lt;BR /&gt;
&amp;gt; vb.net.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for looking at it.  There are no changes to the drawing/database&lt;BR /&gt;
they we want to commit.  Once the bitmap is obtained everything should&lt;BR /&gt;
be discarded.  A transaction abort could be added but is it really needed?&lt;BR /&gt;
&lt;BR /&gt;
Terry&lt;/NOSPAM&gt;</description>
      <pubDate>Sat, 13 Feb 2010 16:27:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632681#M67034</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T16:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632682#M67035</link>
      <description>{quote}&lt;BR /&gt;
&lt;BR /&gt;
There are no changes to the drawing/database&lt;BR /&gt;
they we want to commit....&lt;BR /&gt;
&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
You should pay more attention to these discussion groups&lt;BR /&gt;
and other resources like Kean's blog.&lt;BR /&gt;
&lt;BR /&gt;
You're not nearly as well-informed as you seem to think,&lt;BR /&gt;
and hopefully, Luis or someone else will explain it to you.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");</description>
      <pubDate>Sat, 13 Feb 2010 16:54:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632682#M67035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T16:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632683#M67036</link>
      <description>Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You should pay more attention to these discussion groups&lt;BR /&gt;
&amp;gt; and other resources like Kean's blog.&lt;BR /&gt;
&lt;BR /&gt;
Coincidentally, a C# unaltered compile of Kean's example ...&lt;BR /&gt;
&lt;BR /&gt;
http://through-the-interface.typepad.com/through_the_interface/2007/04/taking_a_snapsh_1.html&lt;BR /&gt;
&lt;BR /&gt;
... exhibits the exact same error as my function in the right sequence.&lt;BR /&gt;
&lt;BR /&gt;
First, draw a line and save it as LINE.DWG for reuse, then ...&lt;BR /&gt;
&lt;BR /&gt;
1) Start AutoCAD 2007/2008.&lt;BR /&gt;
2) Netload OSS.DLL&lt;BR /&gt;
3) Open LINE.DWG&lt;BR /&gt;
4) Issue the OSS command, no problem yet.&lt;BR /&gt;
5) Close the drawing, don't save changes.&lt;BR /&gt;
6) Open the LINE.DWG again.&lt;BR /&gt;
7) Issue the OSS command, crash.&lt;BR /&gt;
&lt;BR /&gt;
The same process works fine in 2009 or higher.&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Sat, 13 Feb 2010 17:17:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632683#M67036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T17:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632684#M67037</link>
      <description>Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You're not nearly as well-informed as you seem to think ...&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed, but I can say "Getting a little&lt;BR /&gt;
better every day!"&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Sat, 13 Feb 2010 17:26:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632684#M67037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T17:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632685#M67038</link>
      <description>I only have installed here A2009 and A2010 - I can install 2007 or 2008 but &lt;BR /&gt;
don't needed for now - but I recall that the block view sample (if that was &lt;BR /&gt;
inspired and taken from the arx sample back on those versions) had some bugs &lt;BR /&gt;
that was causing exporadic crashes, sometimes while doing the panning or &lt;BR /&gt;
when closing AutoCAD if I remember right - but as you said appears to work &lt;BR /&gt;
on later acad versions.&lt;BR /&gt;
&lt;BR /&gt;
Also, remember that Chad (objectdcl) used that particular sample and the &lt;BR /&gt;
same problem, crashed AutoCAD - I think that it is resolved on the objectdcl &lt;BR /&gt;
and the opendcl code....&lt;BR /&gt;
&lt;BR /&gt;
I did an small command quickview arx/mfc using a little portions of that &lt;BR /&gt;
sample, and got the problem resolved - sorry can post the code, it is for &lt;BR /&gt;
the software company I work.&lt;BR /&gt;
&lt;BR /&gt;
And by the way, I do not follow the samples provided on the ADN, just as &lt;BR /&gt;
reference and normally I will try to avoid them, have learned much from &lt;BR /&gt;
people like Tony, Owen, to mention just two that frequent here in the &lt;BR /&gt;
customization ngs.&lt;BR /&gt;
&lt;BR /&gt;
//--&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:6336193@discussion.autodesk.com...&lt;BR /&gt;
Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You're not nearly as well-informed as you seem to think ...&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed, but I can say "Getting a little&lt;BR /&gt;
better every day!"&lt;BR /&gt;
&lt;BR /&gt;
Terry&lt;/NOSPAM&gt;</description>
      <pubDate>Sat, 13 Feb 2010 17:43:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632685#M67038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T17:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632686#M67039</link>
      <description>OK... was able to give it a try (using OSS code) and got your error on the &lt;BR /&gt;
first post (on A2007 not on A2009 or A2010).&lt;BR /&gt;
&lt;BR /&gt;
Will try to play a little bit and see what can I get.&lt;BR /&gt;
&lt;BR /&gt;
//---&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:6336182@discussion.autodesk.com...&lt;BR /&gt;
Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You should pay more attention to these discussion groups&lt;BR /&gt;
&amp;gt; and other resources like Kean's blog.&lt;BR /&gt;
&lt;BR /&gt;
Coincidentally, a C# unaltered compile of Kean's example ...&lt;BR /&gt;
&lt;BR /&gt;
http://through-the-interface.typepad.com/through_the_interface/2007/04/taking_a_snapsh_1.html&lt;BR /&gt;
&lt;BR /&gt;
... exhibits the exact same error as my function in the right sequence.&lt;BR /&gt;
&lt;BR /&gt;
First, draw a line and save it as LINE.DWG for reuse, then ...&lt;BR /&gt;
&lt;BR /&gt;
1) Start AutoCAD 2007/2008.&lt;BR /&gt;
2) Netload OSS.DLL&lt;BR /&gt;
3) Open LINE.DWG&lt;BR /&gt;
4) Issue the OSS command, no problem yet.&lt;BR /&gt;
5) Close the drawing, don't save changes.&lt;BR /&gt;
6) Open the LINE.DWG again.&lt;BR /&gt;
7) Issue the OSS command, crash.&lt;BR /&gt;
&lt;BR /&gt;
The same process works fine in 2009 or higher.&lt;BR /&gt;
&lt;BR /&gt;
Terry&lt;/NOSPAM&gt;</description>
      <pubDate>Sat, 13 Feb 2010 20:19:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632686#M67039</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T20:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632687#M67040</link>
      <description>Well, did several tests and indeed it will return the 'pure virtual function &lt;BR /&gt;
call' message&lt;BR /&gt;
&lt;BR /&gt;
On my first try outs was getting this on the JIT - by having a new class on &lt;BR /&gt;
one of my existing projects:&lt;BR /&gt;
&lt;BR /&gt;
--------------------------------------------------&lt;BR /&gt;
************** Exception Text **************&lt;BR /&gt;
System.Reflection.TargetInvocationException: Exception has been thrown by &lt;BR /&gt;
the target of an invocation. ---&amp;gt;&lt;BR /&gt;
 System.NullReferenceException: Object reference not set to an instance of &lt;BR /&gt;
an object.&lt;BR /&gt;
   at Autodesk.AutoCAD.GraphicsSystem.Manager.CreateAutoCADOffScreenDevice()&lt;BR /&gt;
   at QPipe.OffscreenImageCreation.SnapshotToFile(String filename, &lt;BR /&gt;
VisualStyleType vst) in &lt;BR /&gt;
D:\Programming\ARX2007\MEP0000\QPipeVS9\OffscreenImageCreation.cs:line 87&lt;BR /&gt;
   at QPipe.OffscreenImageCreation.OffscreenSnapshot() in &lt;BR /&gt;
D:\Programming\ARX2007\MEP0000\QPipeVS9\OffscreenImageCreation.cs:line 26&lt;BR /&gt;
   --- End of inner exception stack trace ---&lt;BR /&gt;
--------------------------------------------------&lt;BR /&gt;
&lt;BR /&gt;
Then, created a new SLN (VS2008) and use the 2007 references only and the &lt;BR /&gt;
above jit error was gone, but still the same error you mentioned.&lt;BR /&gt;
&lt;BR /&gt;
Time to report a bug to the adesk guys.&lt;BR /&gt;
&lt;BR /&gt;
Maybe &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
//--&lt;BR /&gt;
&lt;LE&gt; wrote in message news:6336222@discussion.autodesk.com...&lt;BR /&gt;
OK... was able to give it a try (using OSS code) and got your error on the&lt;BR /&gt;
first post (on A2007 not on A2009 or A2010).&lt;BR /&gt;
&lt;BR /&gt;
Will try to play a little bit and see what can I get.&lt;BR /&gt;
&lt;BR /&gt;
//---&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message&lt;BR /&gt;
news:6336182@discussion.autodesk.com...&lt;BR /&gt;
Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You should pay more attention to these discussion groups&lt;BR /&gt;
&amp;gt; and other resources like Kean's blog.&lt;BR /&gt;
&lt;BR /&gt;
Coincidentally, a C# unaltered compile of Kean's example ...&lt;BR /&gt;
&lt;BR /&gt;
http://through-the-interface.typepad.com/through_the_interface/2007/04/taking_a_snapsh_1.html&lt;BR /&gt;
&lt;BR /&gt;
... exhibits the exact same error as my function in the right sequence.&lt;BR /&gt;
&lt;BR /&gt;
First, draw a line and save it as LINE.DWG for reuse, then ...&lt;BR /&gt;
&lt;BR /&gt;
1) Start AutoCAD 2007/2008.&lt;BR /&gt;
2) Netload OSS.DLL&lt;BR /&gt;
3) Open LINE.DWG&lt;BR /&gt;
4) Issue the OSS command, no problem yet.&lt;BR /&gt;
5) Close the drawing, don't save changes.&lt;BR /&gt;
6) Open the LINE.DWG again.&lt;BR /&gt;
7) Issue the OSS command, crash.&lt;BR /&gt;
&lt;BR /&gt;
The same process works fine in 2009 or higher.&lt;BR /&gt;
&lt;BR /&gt;
Terry&lt;/NOSPAM&gt;&lt;/LE&gt;</description>
      <pubDate>Sat, 13 Feb 2010 21:24:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632687#M67040</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-13T21:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632688#M67041</link>
      <description>LE wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Time to report a bug to the adesk guys.&lt;BR /&gt;
&lt;BR /&gt;
Many thanks for your effort in confirming my suspicions.  I doubt&lt;BR /&gt;
anything will come of it since it's 2007/2008.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again!&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Sun, 14 Feb 2010 00:41:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632688#M67041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-14T00:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632689#M67042</link>
      <description>Well, I tried not much help at all, and you are welcome.&lt;BR /&gt;
&lt;BR /&gt;
Maybe, your next resort is to make an arx app (maybe based on the blockview &lt;BR /&gt;
sample) and export the functions via pinvoke, or something like that.&lt;BR /&gt;
&lt;BR /&gt;
//--&lt;BR /&gt;
Many thanks for your effort in confirming my suspicions.  I doubt&lt;BR /&gt;
anything will come of it since it's 2007/2008.&lt;BR /&gt;
&lt;BR /&gt;
Thanks again!&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Sun, 14 Feb 2010 01:51:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632689#M67042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-14T01:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632690#M67043</link>
      <description>{quote}&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed,&lt;BR /&gt;
&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
You imply to be well-informed when someone who is much&lt;BR /&gt;
more well-informed than yourself correctly points out an error&lt;BR /&gt;
in your code (allowing a transaction to abort), and you just&lt;BR /&gt;
blow them off, as if you already know better.&lt;BR /&gt;
&lt;BR /&gt;
But, please don't let this keep you from undertaking further&lt;BR /&gt;
excercises in self-humiliation, as I'm sure they'll instill great&lt;BR /&gt;
confidence in those whom you are trying to peddling the&lt;BR /&gt;
result of your learning excises to.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message&lt;BR /&gt;
news:6336193@discussion.autodesk.com...&lt;BR /&gt;
Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You're not nearly as well-informed as you seem to think ...&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed, but I can say "Getting a little&lt;BR /&gt;
better every day!"&lt;BR /&gt;
&lt;BR /&gt;
Terry&lt;/NOSPAM&gt;</description>
      <pubDate>Sun, 14 Feb 2010 15:42:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632690#M67043</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-14T15:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632691#M67044</link>
      <description>I gave it another fresh try, earlier today to the code: &lt;BR /&gt;
OffscreenImageCreation.cs&lt;BR /&gt;
&lt;BR /&gt;
And found the problem and fixed it... it is the View view = new View(); &lt;BR /&gt;
call - what's it is interesting is why on later version the original code &lt;BR /&gt;
works as-is, and why the first use of the command OSS works, did not went in &lt;BR /&gt;
deep into that.&lt;BR /&gt;
&lt;BR /&gt;
The solution that works here it is:&lt;BR /&gt;
&lt;BR /&gt;
1. - You can get rid off basically all the using's calls  - in my case I &lt;BR /&gt;
removed all of them&lt;BR /&gt;
2. - Then start a transaction to wrap all the calls after this line:&lt;BR /&gt;
int vpn = System.Convert.ToInt32(Application.GetSystemVariable("CVPORT"));&lt;BR /&gt;
&lt;BR /&gt;
3. Make use of one Drawable object - in my case I used the BTR - model &lt;BR /&gt;
space - the same one it is use on the sample.&lt;BR /&gt;
&lt;BR /&gt;
4. Instead of the use of View view = new View();&lt;BR /&gt;
&lt;BR /&gt;
Replace it with:&lt;BR /&gt;
&lt;BR /&gt;
View view = gsm.CreateAutoCADView(btr); // or your own Drawable - temp.&lt;BR /&gt;
&lt;BR /&gt;
5. Then do the commit at the end of the using:&lt;BR /&gt;
&lt;BR /&gt;
 tr.Commit();&lt;BR /&gt;
&lt;BR /&gt;
And should work - I don't get any crash anymore - on all my tests here - did &lt;BR /&gt;
not tested under a later AutoCAD version but I think it will work too.&lt;BR /&gt;
&lt;BR /&gt;
See if helps.&lt;BR /&gt;
&lt;BR /&gt;
//--&lt;BR /&gt;
"Tony Tanzillo"&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed,&lt;BR /&gt;
&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
You imply to be well-informed when someone who is much&lt;BR /&gt;
more well-informed than yourself correctly points out an error&lt;BR /&gt;
in your code (allowing a transaction to abort), and you just&lt;BR /&gt;
blow them off, as if you already know better.&lt;BR /&gt;
&lt;BR /&gt;
But, please don't let this keep you from undertaking further&lt;BR /&gt;
excercises in self-humiliation, as I'm sure they'll instill great&lt;BR /&gt;
confidence in those whom you are trying to peddling the&lt;BR /&gt;
result of your learning excises to.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message&lt;BR /&gt;
news:6336193@discussion.autodesk.com...&lt;BR /&gt;
Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You're not nearly as well-informed as you seem to think ...&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed, but I can say "Getting a little&lt;BR /&gt;
better every day!"&lt;BR /&gt;
&lt;BR /&gt;
Terry&lt;/NOSPAM&gt;</description>
      <pubDate>Sun, 14 Feb 2010 18:14:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632691#M67044</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-14T18:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632692#M67045</link>
      <description>Hmm... spoke to soon, it does not crash while having AutoCAD open, only when &lt;BR /&gt;
closing... my guess that one of the using that I removed might be needed, &lt;BR /&gt;
but will left that for you or other to give it a try &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Was interesting if you tell me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
Luis.&lt;BR /&gt;
&lt;BR /&gt;
&lt;LE&gt; wrote in message news:6336365@discussion.autodesk.com...&lt;BR /&gt;
I gave it another fresh try, earlier today to the code:&lt;BR /&gt;
OffscreenImageCreation.cs&lt;BR /&gt;
&lt;BR /&gt;
And found the problem and fixed it... it is the View view = new View();&lt;BR /&gt;
call - what's it is interesting is why on later version the original code&lt;BR /&gt;
works as-is, and why the first use of the command OSS works, did not went in&lt;BR /&gt;
deep into that.&lt;BR /&gt;
&lt;BR /&gt;
The solution that works here it is:&lt;BR /&gt;
&lt;BR /&gt;
1. - You can get rid off basically all the using's calls  - in my case I&lt;BR /&gt;
removed all of them&lt;BR /&gt;
2. - Then start a transaction to wrap all the calls after this line:&lt;BR /&gt;
int vpn = System.Convert.ToInt32(Application.GetSystemVariable("CVPORT"));&lt;BR /&gt;
&lt;BR /&gt;
3. Make use of one Drawable object - in my case I used the BTR - model&lt;BR /&gt;
space - the same one it is use on the sample.&lt;BR /&gt;
&lt;BR /&gt;
4. Instead of the use of View view = new View();&lt;BR /&gt;
&lt;BR /&gt;
Replace it with:&lt;BR /&gt;
&lt;BR /&gt;
View view = gsm.CreateAutoCADView(btr); // or your own Drawable - temp.&lt;BR /&gt;
&lt;BR /&gt;
5. Then do the commit at the end of the using:&lt;BR /&gt;
&lt;BR /&gt;
 tr.Commit();&lt;BR /&gt;
&lt;BR /&gt;
And should work - I don't get any crash anymore - on all my tests here - did&lt;BR /&gt;
not tested under a later AutoCAD version but I think it will work too.&lt;BR /&gt;
&lt;BR /&gt;
See if helps.&lt;BR /&gt;
&lt;BR /&gt;
//--&lt;BR /&gt;
"Tony Tanzillo"&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed,&lt;BR /&gt;
&lt;BR /&gt;
{quote}&lt;BR /&gt;
&lt;BR /&gt;
You imply to be well-informed when someone who is much&lt;BR /&gt;
more well-informed than yourself correctly points out an error&lt;BR /&gt;
in your code (allowing a transaction to abort), and you just&lt;BR /&gt;
blow them off, as if you already know better.&lt;BR /&gt;
&lt;BR /&gt;
But, please don't let this keep you from undertaking further&lt;BR /&gt;
excercises in self-humiliation, as I'm sure they'll instill great&lt;BR /&gt;
confidence in those whom you are trying to peddling the&lt;BR /&gt;
result of your learning excises to.&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
http://www.caddzone.com&lt;BR /&gt;
&lt;BR /&gt;
AcadXTabs: MDI Document Tabs for AutoCAD&lt;BR /&gt;
Supporting AutoCAD 2000 through 2010&lt;BR /&gt;
&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");&lt;BR /&gt;
&lt;BR /&gt;
"Terry W. Dotson" &lt;NOSPAM&gt; wrote in message&lt;BR /&gt;
news:6336193@discussion.autodesk.com...&lt;BR /&gt;
Tony Tanzillo wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; You're not nearly as well-informed as you seem to think ...&lt;BR /&gt;
&lt;BR /&gt;
Never claimed to be well-informed, but I can say "Getting a little&lt;BR /&gt;
better every day!"&lt;BR /&gt;
&lt;BR /&gt;
Terry&lt;/NOSPAM&gt;&lt;/LE&gt;</description>
      <pubDate>Sun, 14 Feb 2010 18:20:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632692#M67045</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-14T18:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: CreateAutoCADOffScreenDevice/GetSnapshot Changes in 2009 ???</title>
      <link>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632693#M67046</link>
      <description>LE wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; Hmm... spoke to soon, it does not crash while having AutoCAD open, &lt;BR /&gt;
&amp;gt; only when closing... my guess that one of the using that I removed &lt;BR /&gt;
&amp;gt; might be needed, but will left that for you or other to give it a try&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
With those changes, in my function it does not crash immediately after&lt;BR /&gt;
opening the drawing but does after it is called a few times or at best&lt;BR /&gt;
crashes on closing.&lt;BR /&gt;
&lt;BR /&gt;
I 'think' I've tried all the combinations of Using -vs- Dim and can't&lt;BR /&gt;
seem to stabilize it, will keep trying.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for the effort and constructive response.&lt;BR /&gt;
&lt;BR /&gt;
Terry</description>
      <pubDate>Sun, 14 Feb 2010 18:47:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/createautocadoffscreendevice-getsnapshot-changes-in-2009/m-p/2632693#M67046</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-14T18:47:56Z</dc:date>
    </item>
  </channel>
</rss>

