<?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: Loading R2000 dwg in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271947#M12243</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; but I could not save the drawing&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Can you upload such a drawing? It's difficult to imagine what a proggi does if that would have a file I don't have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2011 12:58:06 GMT</pubDate>
    <dc:creator>Alfred.NESWADBA</dc:creator>
    <dc:date>2011-12-22T12:58:06Z</dc:date>
    <item>
      <title>Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271851#M12239</link>
      <description>&lt;P&gt;When loading a R2000 dwg I ge this error:-&lt;/P&gt;&lt;P&gt;&lt;IMG title="Capture1.GIF" alt="Capture1.GIF" src="http://forums.autodesk.com/t5/image/serverpage/image-id/18319iB75FD77824738863/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I click OK I can continue to edit the drawing. This error is not fatal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I try to load the drawing via my application (using COM) I do get an error&lt;/P&gt;&lt;P&gt;"File D:\My Drawings\00160000\2A.DWG is not a valid drawing file"&lt;/P&gt;&lt;P&gt;and I can't load it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 11:09:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271851#M12239</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-22T11:09:33Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271879#M12240</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can try&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;to start a sendcommand (I hate it, but sometimes we need it all) and start the command _RECOVER. Do all that only if the default open-sub does not work.&lt;/LI&gt;&lt;LI&gt;not to open it, but create a new drawing and insert the old one (don't forget, you have to load the layouts then separately!)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;And no app can be fully prepared to work with drawings that are:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;defect&lt;/LI&gt;&lt;LI&gt;raise an exception during loading&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;....except applications that a specialized in DWG-repairing &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First, I would verify what happend with this drawing and clean the errors .... before working with this DWG any single step more &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Good luck, - alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 11:36:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271879#M12240</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-12-22T11:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271895#M12241</link>
      <description>&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/AutoCAD-2011/Problem-loading-r2000-drawing/td-p/3271847" target="_self"&gt;&amp;gt;&amp;gt;&amp;gt;crosspost&amp;lt;&amp;lt;&amp;lt;&lt;/A&gt; where do we continue now?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 12:02:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271895#M12241</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-12-22T12:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271937#M12242</link>
      <description>&lt;P&gt;OK.&lt;/P&gt;&lt;P&gt;I tried to Recover the drawing and faults were found, but I could not save the drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG title="Capture2.GIF" alt="Capture2.GIF" src="http://forums.autodesk.com/t5/image/serverpage/image-id/18325i9500B23BA88F51DC/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" align="center" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I still need to deal with this problem in my COM object.&lt;/P&gt;&lt;P&gt;The code is straightforward.&lt;/P&gt;&lt;PRE&gt;   Public Sub LoadDwg(ByVal FileName As String, ByVal LayoutName As String)
      Try
         App.Visible = True
         App.WindowState = AcWindowState.acMax
         If LayoutName = "" Then LayName = "Model" Else LayName = LayoutName
         App.Documents.Open(FileName, False)                                              '  with name of drawing to open (True= Read-Only)
      Catch ex As Exception
         If ex.Message.Contains("is not a valid drawing file") Then
            ShowWarning(FileName &amp;amp; " seems to be corrupt", "Load it manually and try using the Recover Command to put it right", e_Button.OKOnly, e_Image.Exclamation)
            Dim i As Integer = App.Documents.Count
            'App.Documents.Item(i).Close()
            App.Visible = True
            App.ZoomExtents()
            App.ActiveDocument.SendCommand(cnEsc &amp;amp; cnEsc &amp;amp; "_OPEN" &amp;amp; vbLf)
         End If
      End Try
   End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;For the moment I am using the OPEN command and not RECOVER.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I try to load the drawing, I am told that AutoCAD has already loaded the drawing. The drawing is not visible despite ACAD being visible. Drawing1 (new dwg) is there and I can close it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I stop execution of my code, App returns, but App.Documents creates error. I can't see how to close the failing drawing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So 2 problems.&lt;/P&gt;&lt;P&gt;Recovering the drawing&lt;/P&gt;&lt;P&gt;Recovering the application&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 12:50:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271937#M12242</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-22T12:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271947#M12243</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; but I could not save the drawing&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Can you upload such a drawing? It's difficult to imagine what a proggi does if that would have a file I don't have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 12:58:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271947#M12243</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-12-22T12:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271987#M12244</link>
      <description>&lt;P&gt;Actually it was a R13 drawing. And as far as I remember no custom objects (were there any then?) etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't WBlock it, but I could DXF it out, and so I DXFin and saved.&lt;/P&gt;&lt;P&gt;Now its fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But - why does AUTO_CONVERTOLDMATERIALS crash? Doesn't it have internal error checking.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And why doesn't Acad allow a save etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I still don't know how to deal with this sort of error in code?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 13:31:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3271987#M12244</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-22T13:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3272179#M12245</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; But - why does AUTO_CONVERTOLDMATERIALS crash?&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;One reason may be: also Autodesk development-people are also "only" humans; another reason could be that the drawing is defect ... and that you can't save it makes me thinking that the second reason is the more important one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; And why doesn't Acad allow a save etc.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Once more ... without playing with this DWG(s) it's not possible (for me) to tell you anything, just as a guess: same like above ==&amp;gt; is this R13-DWG defect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; and I still don't know how to deal with this sort of error in code?&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;As long as you don't write an app for "repairing drawings" you should come back to the goal of your app.&lt;/P&gt;&lt;P&gt;If a user runs your app with defect drawings, he has to repair them before starting your app. Do a perfect error handling that your app does not crash when trying to open such DWGs, but that's it.&lt;/P&gt;&lt;P&gt;If there are multiple defect drawings you could try _DWGCONVERT to get them cleaned?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 15:03:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3272179#M12245</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-12-22T15:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3272335#M12246</link>
      <description>&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually most of the dwgs in this folder are R13 and I am having problems with many of them.&lt;/P&gt;&lt;P&gt;If I may, I'll come back to this if I find out something interesting.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 16:14:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3272335#M12246</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-22T16:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3272401#M12247</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you think about "new drawing" and "insert old one"?&lt;/P&gt;&lt;P&gt;Have you tried _DWGCONVERT if there is a chance to prepare the drawing in this way automatically before proceeding with your app?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2011 16:46:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3272401#M12247</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-12-22T16:46:46Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3273243#M12248</link>
      <description>&lt;P&gt;Gosh, that seems to be a complicated solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I created a DXF file and had a look at it.&lt;/P&gt;&lt;P&gt;I note that it refers to font files that don't exist. (the path is not there). The drawings were copied from another computer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could this be the reason?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 10:38:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3273243#M12248</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-23T10:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3273249#M12249</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; I note that it refers to font files that don't exist.&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I don't think so because if fonts are missing there is on one side the technique to get them replaced by a font that exists plus on the other side it has nothing to do with the material-arx crash.&lt;/P&gt;&lt;P&gt;But I have not looked into the DXF, if you find there some material-definitions and you can remove them without damaging the DXF .... that could be a solution.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 10:55:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3273249#M12249</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-12-23T10:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3273307#M12250</link>
      <description>&lt;P&gt;You are quite right. Autocad replaces faulty fonts with default fonts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking at the drawing (I dxfout and in) all I use that might be special are 3D Faces. Remember R13 was pretty limited.&lt;/P&gt;&lt;P&gt;The DXF File referes to AVE_ENTITY_MATERIAL and AVE_MATERIAL as well as various AcDb objects, but this might be because the DXF file was not generated by R13.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the interesting point for me is that trying to write code that other users might want, I have to assume that somewhere along the line, they might have similar problems.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I error check this, and more importantly, can I write code to put these problems right without too much intervention from the user?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What do you think?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ps TrueView 2012 has no problem viewing the dwg.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 13:02:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3273307#M12250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-23T13:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Loading R2000 dwg</title>
      <link>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3273375#M12251</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;FONT color="#666699"&gt;&amp;gt;&amp;gt; can I write code to put these problems right without too much intervention from the user?&lt;/FONT&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;As long as you always have the same error ... yes, you should be able to create am error handling to make your app save from crashes. But if you have a lot of drawings ... and you found one error that creates an arx-exception then there may be more/different defects in these drawings and that get's hard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Upload 2 or 3 of your drawings, Let's see what if there are some other ideas when looking into these DWGs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- alfred -&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2011 14:10:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/loading-r2000-dwg/m-p/3273375#M12251</guid>
      <dc:creator>Alfred.NESWADBA</dc:creator>
      <dc:date>2011-12-23T14:10:28Z</dc:date>
    </item>
  </channel>
</rss>

