Results 1 to 3 of 3

Thread: Get Attributes Without Opening Drawing Files

  1. #1
    I could stop if I wanted to
    Join Date
    2015-09
    Posts
    420
    Login to Give a bone
    0

    Question Get Attributes Without Opening Drawing Files

    Good Afternoon AUGI Members:

    I am relatively new to VBA programming and I do not know if this question was already posted, so I apologize in advance if it has been asked before.

    I would like to have a VBA routine allow the user the ability to select a directory of AutoCAD drawing files (batch) and extract known attributes from these files and then write this information into an Excel spread sheet. From what I have read so far it appears that this can be accomplished but I do not know where to start or how to begin. If someone can point me in the right direction and or provide some simple examples for me to get started I can attempt to develop this routine.

    I would appreciate any assistance with this effort.

    Regards,
    Vince

  2. #2
    The Silent Type RobertB's Avatar
    Join Date
    2000-01
    Location
    Seattle WA USA
    Posts
    5,859
    Login to Give a bone
    0

    Default Re: Get Attributes Without Opening Drawing Files

    Vince,

    The mechanism you are looking for the the ObjectDBX interface. It permits access to drawings without opening them visibly in the editor. (So they open much faster.)
    Code:
    'Requires reference to AutoCAD/ObjectDBX Common Type Library
    Option Explicit
    
    Sub Test()
      Dim oDBX As AxDbDocument
      Set oDBX = New AxDbDocument
      oDBX.Open "C:\Temp\Test.dwg"
      MsgBox "First layer name is " & oDBX.Layers.Item(0).Name
      Set oDBX = Nothing
    End Sub

  3. #3
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    5,980
    Login to Give a bone
    0

    Default Re: Get Attributes Without Opening Drawing Files

    As for the other parts, connecting to other programs like xl is called ActiveX automation. If you installed the samples with acad, there is one on extracting atts to xl.
    C:> ED WORKING....

Similar Threads

  1. Replies: 2
    Last Post: 2007-06-12, 11:23 AM
  2. Replies: 12
    Last Post: 2007-06-12, 08:55 AM
  3. Wipeout Proxy Objects when opening drawing files.
    By LynNV in forum AutoCAD General
    Replies: 2
    Last Post: 2006-07-18, 05:50 PM
  4. Opening Drawing files from commandline...
    By Chris Matira in forum AutoCAD General
    Replies: 3
    Last Post: 2005-12-07, 08:22 AM
  5. Remove Read Only attributes from drawing files
    By eng5 in forum AutoCAD General
    Replies: 4
    Last Post: 2005-05-03, 12:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •