<?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 Newbie question in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538467#M69415</link>
    <description>I'm starting the transition from VBA to VB .Net, so this is probably incredibly easy.  I haven't even started writing my own code yet, just pasting snippets to get a feel for everything.  I've put in a sub routine to draw a single line in model space of AutoCAD.  Works great.  The problem occurs when I create a form and try to call the sub routine from a button.  Then I get an "eLockViolation" when I try to open the model space "for write".  I'm guessing that it is because AutoCAD is no longer active because this form is active?  If that makes any sense?  But, even if I hide the form before I call the sub routine, I still get the error.  &lt;BR /&gt;
&lt;BR /&gt;
Any suggestions would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;BR /&gt;
&lt;BR /&gt;
See attachment for the code.</description>
    <pubDate>Tue, 11 Aug 2009 18:52:19 GMT</pubDate>
    <dc:creator>david_sexton</dc:creator>
    <dc:date>2009-08-11T18:52:19Z</dc:date>
    <item>
      <title>Newbie question</title>
      <link>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538467#M69415</link>
      <description>I'm starting the transition from VBA to VB .Net, so this is probably incredibly easy.  I haven't even started writing my own code yet, just pasting snippets to get a feel for everything.  I've put in a sub routine to draw a single line in model space of AutoCAD.  Works great.  The problem occurs when I create a form and try to call the sub routine from a button.  Then I get an "eLockViolation" when I try to open the model space "for write".  I'm guessing that it is because AutoCAD is no longer active because this form is active?  If that makes any sense?  But, even if I hide the form before I call the sub routine, I still get the error.  &lt;BR /&gt;
&lt;BR /&gt;
Any suggestions would be appreciated.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;BR /&gt;
&lt;BR /&gt;
Dave&lt;BR /&gt;
&lt;BR /&gt;
See attachment for the code.</description>
      <pubDate>Tue, 11 Aug 2009 18:52:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538467#M69415</guid>
      <dc:creator>david_sexton</dc:creator>
      <dc:date>2009-08-11T18:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question</title>
      <link>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538468#M69416</link>
      <description>Dim myDWG As Document = ApplicationServices.Application.DocumentManager.MdiActiveDocument&lt;BR /&gt;
&lt;BR /&gt;
        Using lock As DocumentLock = myDWG.LockDocument&lt;BR /&gt;
            ' do stuff&lt;BR /&gt;
        End Using</description>
      <pubDate>Tue, 11 Aug 2009 19:58:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538468#M69416</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2009-08-11T19:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question</title>
      <link>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538469#M69417</link>
      <description>That did it!!  Thanks!</description>
      <pubDate>Tue, 11 Aug 2009 20:17:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538469#M69417</guid>
      <dc:creator>david_sexton</dc:creator>
      <dc:date>2009-08-11T20:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie question</title>
      <link>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538470#M69418</link>
      <description>Your Welcome</description>
      <pubDate>Tue, 11 Aug 2009 22:45:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/newbie-question/m-p/2538470#M69418</guid>
      <dc:creator>arcticad</dc:creator>
      <dc:date>2009-08-11T22:45:39Z</dc:date>
    </item>
  </channel>
</rss>

