<?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: Edit dwg Properties in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887280#M27362</link>
    <description>works great, thanks</description>
    <pubDate>Sun, 11 Feb 2007 15:49:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-02-11T15:49:32Z</dc:date>
    <item>
      <title>Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887277#M27359</link>
      <description>Is it possible to edit the properties of a dwg file that isn't open in AutoCAD via VB/VBA/VL? I want to add summary information to the comments text box without opening the files.&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Sat, 10 Feb 2007 17:32:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887277#M27359</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-10T17:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887278#M27360</link>
      <description>ObjectDBX ?&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 2004/2005/2006/2007&lt;BR /&gt;
http://www.acadxtabs.com&lt;BR /&gt;
&lt;BR /&gt;
&lt;KJENNE&gt; wrote in message news:5482448@discussion.autodesk.com...&lt;BR /&gt;
Is it possible to edit the properties of a dwg file that isn't open in AutoCAD via VB/VBA/VL? I want to add summary information to the comments text box without opening the files.&lt;BR /&gt;
&lt;BR /&gt;
Thanks&lt;/KJENNE&gt;</description>
      <pubDate>Sun, 11 Feb 2007 08:50:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887278#M27360</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-11T08:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887279#M27361</link>
      <description>Agreed,&lt;BR /&gt;
Is this code correct?&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
' request reference to your current version of&lt;BR /&gt;
' AutoCAD/ObjectDBX Common XX.0 Type Library&lt;BR /&gt;
Sub AddSumInfoDBX()&lt;BR /&gt;
&lt;BR /&gt;
     On Error GoTo Err_Control&lt;BR /&gt;
     Dim fn As String&lt;BR /&gt;
     Dim oDBX As AxDbDocument&lt;BR /&gt;
&lt;BR /&gt;
     fn = "C:\temp.dwg"&lt;BR /&gt;
&lt;BR /&gt;
     Set oDBX = New AxDbDocument&lt;BR /&gt;
     Dim sInfo As Object&lt;BR /&gt;
&lt;BR /&gt;
     Set oDBX = Application.GetInterfaceObject("ObjectDBX.AxDbDocument.16") '&amp;lt;--17 for higher then A2005&lt;BR /&gt;
&lt;BR /&gt;
     ' Add custom info&lt;BR /&gt;
     Set sInfo = oDBX.SummaryInfo&lt;BR /&gt;
     sInfo.Title = "Title"&lt;BR /&gt;
     sInfo.Author = "Me"&lt;BR /&gt;
     sInfo.Comments = "No comments, sir"&lt;BR /&gt;
     sInfo.Keywords = "Keywords"&lt;BR /&gt;
     sInfo.RevisionNumber = Format(Now, "dd/mm/yyyy")&lt;BR /&gt;
     sInfo.LastSavedBy = "Me"&lt;BR /&gt;
     sInfo.Subject = "Subject"&lt;BR /&gt;
     &lt;BR /&gt;
     ' Add custom properties (and remove prior one)&lt;BR /&gt;
  &lt;BR /&gt;
     Dim cusKeys As Variant&lt;BR /&gt;
     Dim cusPropArr As Variant&lt;BR /&gt;
     Dim cusValArr As Variant&lt;BR /&gt;
     Dim i As Integer&lt;BR /&gt;
     Dim keyName1, keyName2, keyName3, keyName4&lt;BR /&gt;
&lt;BR /&gt;
     cusKeys = Array(keyName1, keyName2, keyName3, keyName4)&lt;BR /&gt;
     cusPropArr = Array("First Property", "Second Property", "Third Property", "Fourth Property")&lt;BR /&gt;
     cusValArr = Array("First Property Value", "Second Property Value", "Third Property Value", "Fourth Property Value")&lt;BR /&gt;
&lt;BR /&gt;
     For i = 0 To UBound(cusKeys)&lt;BR /&gt;
          sInfo.AddCustomInfo cusPropArr(i), cusValArr(i)&lt;BR /&gt;
     Next&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
     oDBX.SaveAs fn&lt;BR /&gt;
     Set oDBX = Nothing&lt;BR /&gt;
&lt;BR /&gt;
Err_Control:&lt;BR /&gt;
&lt;BR /&gt;
     MsgBox "Error Number: " &amp;amp; Err.Number &amp;amp; vbNewLine &amp;amp; _&lt;BR /&gt;
     "Error: " &amp;amp; vbNewLine &amp;amp; Err.Description&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Sun, 11 Feb 2007 13:08:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887279#M27361</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-11T13:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887280#M27362</link>
      <description>works great, thanks</description>
      <pubDate>Sun, 11 Feb 2007 15:49:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887280#M27362</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-11T15:49:32Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887281#M27363</link>
      <description>Glad if that helps&lt;BR /&gt;
&lt;BR /&gt;
Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
~'J'~</description>
      <pubDate>Sun, 11 Feb 2007 17:27:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887281#M27363</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-11T17:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887282#M27364</link>
      <description>Ok this works to put in the author info, but drawing is set to a new drawing. I need it to edit an existing drawing, Any ideas?  Thanks for the help.&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
' request reference to your current version of&lt;BR /&gt;
' AutoCAD/ObjectDBX Common XX.0 Type Library&lt;BR /&gt;
Sub AddSumInfoDBX()&lt;BR /&gt;
Dim fn As String&lt;BR /&gt;
Dim oDBX As AxDbDocument&lt;BR /&gt;
fn = "C:\temp.dwg"&lt;BR /&gt;
Dim sInfo As Object&lt;BR /&gt;
Set oDBX = Application.GetInterfaceObject("ObjectDBX.AxDbDocument.17")&lt;BR /&gt;
Set sInfo = oDBX.SummaryInfo&lt;BR /&gt;
sInfo.Author = "Me"&lt;BR /&gt;
oDBX.SaveAs fn&lt;BR /&gt;
Set oDBX = Nothing&lt;BR /&gt;
End Sub</description>
      <pubDate>Mon, 12 Feb 2007 22:51:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887282#M27364</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-12T22:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887283#M27365</link>
      <description>&lt;KJENNE&gt; wrote in message news:5484240@discussion.autodesk.com...&lt;BR /&gt;
Ok this works to put in the author info, but drawing is set to a new&lt;BR /&gt;
drawing. I need it to edit an existing drawing, Any ideas?  Thanks for the&lt;BR /&gt;
help.&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
' request reference to your current version of&lt;BR /&gt;
' AutoCAD/ObjectDBX Common XX.0 Type Library&lt;BR /&gt;
Sub AddSumInfoDBX()&lt;BR /&gt;
Dim fn As String&lt;BR /&gt;
Dim oDBX As AxDbDocument&lt;BR /&gt;
&lt;BR /&gt;
fn =  FilenameToOpen '&amp;lt;----------&lt;BR /&gt;
&lt;BR /&gt;
Dim sInfo As Object&lt;BR /&gt;
Set oDBX = Application.GetInterfaceObject("ObjectDBX.AxDbDocument.17")&lt;BR /&gt;
&lt;BR /&gt;
'trap for errors of course...&lt;BR /&gt;
oDbx.Open fn  '&amp;lt;----------&lt;BR /&gt;
&lt;BR /&gt;
Set sInfo = oDBX.SummaryInfo&lt;BR /&gt;
sInfo.Author = "Me"&lt;BR /&gt;
oDBX.SaveAs fn&lt;BR /&gt;
Set oDBX = Nothing&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
hth&lt;BR /&gt;
Mark&lt;/KJENNE&gt;</description>
      <pubDate>Mon, 12 Feb 2007 23:01:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/1887283#M27365</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-02-12T23:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/3913878#M27366</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I've been programming Inventor for 8 years now so programming AutoCAD is rather new to me. We are implementing Vault Pro and we have a huge amount of legacy drawing in AutoCAD that need to go into the vault. So I am trying to set the properties of these drawings using VB6. I have used the code provided here in this thread, but I am getting an error that says "Problem in loading application" on this line...&lt;/P&gt;&lt;P&gt;Set oDBX = oAcadApp.GetInterfaceObject("ObjectDBX.AxDbDocument.17")&lt;/P&gt;&lt;P&gt;I have referenced the AutoCAD Type Library 2013 and the AutoCAD/ObjectDBX Common 19.0 Type Library (which for some reason I have 2 in my reference list and I've tried both).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help here would be greatly appreciated!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2013 17:22:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/3913878#M27366</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2013-05-08T17:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/3913922#M27367</link>
      <description>&lt;P&gt;I tried changing the ObjectDBX.AxDbDocument.17 to ObjectDBX.AxDbDocument.19 and now I get a Type Mismatch error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW will I be able to edit the property values?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code...&lt;/P&gt;&lt;P&gt;Dim oAcadApp As AcadApplication&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 'The AutoCAD application object&lt;BR /&gt;Set oAcadApp = GetObject(, "AutoCAD.Application")&lt;/P&gt;&lt;P&gt;Dim oDBX As AxDbDocument&lt;BR /&gt;Set oDBX = oAcadApp.GetInterfaceObject("ObjectDBX.AxDbDocument.19")&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2013 18:11:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/3913922#M27367</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2013-05-08T18:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/3920530#M27368</link>
      <description>&lt;P&gt;No help?&lt;/P&gt;&lt;P&gt;Anyone?&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2013 18:48:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/3920530#M27368</guid>
      <dc:creator>meck</dc:creator>
      <dc:date>2013-05-13T18:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7780059#M27369</link>
      <description>Can this be done with Microsoft access?</description>
      <pubDate>Thu, 15 Feb 2018 12:01:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7780059#M27369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T12:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781403#M27370</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;Can this be done with Microsoft access?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, but acad needs to be installed on the pc in order for the class to be registered, and your project needs to reference &lt;STRONG&gt;AutoCAD/ObjectDBX Common ##.# Type Library&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:11:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781403#M27370</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2018-02-15T18:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781422#M27371</link>
      <description>&lt;P&gt;Done...&amp;nbsp; Can you suggest code?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:15:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781422#M27371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T18:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781504#M27372</link>
      <description>&lt;P&gt;^^ Look above.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:43:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781504#M27372</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2018-02-15T18:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781509#M27373</link>
      <description>&lt;P&gt;AcadApplication does not work with the 22.0 library.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:44:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781509#M27373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T18:44:31Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781519#M27374</link>
      <description>&lt;P&gt;Look at Marks' reply in post 7. You don't need to use AcadApplication. You use the odbx app instead.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:47:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781519#M27374</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2018-02-15T18:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781523#M27375</link>
      <description>&lt;P&gt;Working on it now.&amp;nbsp; Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:48:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781523#M27375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T18:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781543#M27376</link>
      <description>&lt;P&gt;Ugh...&amp;nbsp; GetInterfaceObject doesn't work either...&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 18:55:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781543#M27376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T18:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781581#M27377</link>
      <description>&lt;P&gt;Did you substitute 22 for 19? Is 22 the version you have installed? What version of acad are you running? You can check the registry in the Classes section.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:15:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781581#M27377</guid>
      <dc:creator>Ed__Jobe</dc:creator>
      <dc:date>2018-02-15T19:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Edit dwg Properties</title>
      <link>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781583#M27378</link>
      <description>&lt;P&gt;The object library is 22.0.&amp;nbsp; We are running Civil 3d 2018.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 19:16:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/edit-dwg-properties/m-p/7781583#M27378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-15T19:16:21Z</dc:date>
    </item>
  </channel>
</rss>

