<?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: vb.net external open cad drawing in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3427569#M56125</link>
    <description>&lt;P&gt;I didn't mean my last comment to be condescending, and I agree with Norman, that if you use the built-in COM mechanisms to open a drawing, there is a built-in way to open them read-only, but I just thought I would try to provide an alternative way, that did not require a significant change in your existing code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will admit, my suggestion requires that the users of your program have (probably a network based) permission to alter the read/write access to the file in question.&amp;nbsp; At my company, that problem could come into question under certain circumstances, but not usually when dealing with drawings.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Apr 2012 06:25:23 GMT</pubDate>
    <dc:creator>chiefbraincloud</dc:creator>
    <dc:date>2012-04-24T06:25:23Z</dc:date>
    <item>
      <title>vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3420353#M56119</link>
      <description>&lt;P&gt;First off, I have working code for opening a cad drawing from an external program.&amp;nbsp; That is perfect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm at a loss for is how can I force a drawing that is NOT readonly to open as readonly from outside cad.&amp;nbsp;&amp;nbsp;&amp;nbsp; I know it's possible within cad, but that doesn't help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me out here?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Apr 2012 22:50:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3420353#M56119</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-18T22:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421145#M56120</link>
      <description>&lt;P&gt;How does your external program open a drawing? Without seeing your perfectly working code, I assume it automates AutoCAD via COM API AcadDocuments.Open() method (that is the drawing is still opened in AUTOCAD!)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This method has 2 optional argument to specify if the drawing to be opened as READONLY, and specify a PASSWORD if the drawing is password-protected:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AcadDocuments.Open "C:\....\mydrawing.dwg", True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;opens a drawing as read-only.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2012 13:51:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421145#M56120</guid>
      <dc:creator>norman.yuan</dc:creator>
      <dc:date>2012-04-19T13:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421367#M56121</link>
      <description>&lt;P&gt;Actually, no.&amp;nbsp; I'm using this to open drawings in cad..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.Diagnostics.Process.Start(dwgpath)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sounds like i should be doing the other way..&amp;nbsp;&amp;nbsp; Is there some place I can get a look at working examples?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2012 15:11:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421367#M56121</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-19T15:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421663#M56122</link>
      <description>&lt;P&gt;I have not tried&amp;nbsp;it , but without rewriting all of your existing code, I believe you could just set the ReadOnly Attribute on the file.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2012 17:06:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421663#M56122</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2012-04-19T17:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421671#M56123</link>
      <description>&lt;P&gt;Not really an option (mainly because I still want the file to be editable at other times).&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2012 17:10:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421671#M56123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-19T17:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421731#M56124</link>
      <description>&lt;P&gt;So Toggle the Attribute before opening, and toggle it back after closing.&amp;nbsp; I assumed that went without saying.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Apr 2012 17:42:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3421731#M56124</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2012-04-19T17:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3427569#M56125</link>
      <description>&lt;P&gt;I didn't mean my last comment to be condescending, and I agree with Norman, that if you use the built-in COM mechanisms to open a drawing, there is a built-in way to open them read-only, but I just thought I would try to provide an alternative way, that did not require a significant change in your existing code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will admit, my suggestion requires that the users of your program have (probably a network based) permission to alter the read/write access to the file in question.&amp;nbsp; At my company, that problem could come into question under certain circumstances, but not usually when dealing with drawings.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 06:25:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3427569#M56125</guid>
      <dc:creator>chiefbraincloud</dc:creator>
      <dc:date>2012-04-24T06:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3428377#M56126</link>
      <description>&lt;P&gt;It's alright, everyone should let there inner Tony T out a few times.&amp;nbsp;&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had briefly thought of doing it that way, but wasn't able to find a way of doing it.&amp;nbsp;&amp;nbsp; I've since gone the COM route.&amp;nbsp; Works great (after several google searches and code corrections).&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 15:15:53 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3428377#M56126</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-24T15:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3428867#M56127</link>
      <description>&lt;P&gt;Would be interesting to show a result of your code,&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oleg&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 18:34:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3428867#M56127</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-04-24T18:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3428889#M56128</link>
      <description>&lt;P&gt;Not much to it, but here you go.&amp;nbsp; (though for some reason cad crashes if it's used to many times in one session... (5+ i've found))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Used with vanilla 2011&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Public Sub Open_DWG ()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim ACAD As Object&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim MyAcadPath As String = "dwgpath"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim bReadOnly As Boolean = True&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; On Error Resume Next&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACAD = GetObject(, "autocad.Application")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACAD = CreateObject("autocad.Application")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show("Failed to start", MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GoTo EndOpen&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'ACAD.Visible = True&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear()&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim NewFile As Object = ACAD.Documents.Open(MyAcadPath, bReadOnly)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MessageBox.Show("Failed to open", MessageBoxButtons.OK, MessageBoxIcon.Information)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;BR /&gt;EndOpen:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACAD = Nothing&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewFile = Nothing&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 18:41:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3428889#M56128</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-04-24T18:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: vb.net external open cad drawing</title>
      <link>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3428933#M56129</link>
      <description>&lt;P&gt;Thanks so much,&lt;/P&gt;&lt;P&gt;Happy computing &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000" face="arial,helvetica,sans-serif"&gt;~'J'~&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Apr 2012 18:56:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/vb-net-external-open-cad-drawing/m-p/3428933#M56129</guid>
      <dc:creator>Hallex</dc:creator>
      <dc:date>2012-04-24T18:56:51Z</dc:date>
    </item>
  </channel>
</rss>

