Results 1 to 3 of 3

Thread: Data extraction with Excel, VBA and...TrueView?

  1. #1
    Woo! Hoo! my 1st post
    Join Date
    2008-12
    Posts
    1
    Login to Give a bone
    0

    Default Data extraction with Excel, VBA and...TrueView?

    Excel-VBA-data extraction questions…

    The business group I work for need to be able to extract data from .dwg files using Excel. They do not have licenses to AutoCad Architecture, and have no budget to purchase them. That is not an option. They do own licenses to TrueView 2008. They need to be able to launch and run the Excel file themselves and cannot rely on anyone else to do the retrieval for them.

    The following VBA code should, I think, allow me to retrieve the data the users need from within Excel and present it in the Excel spreadsheet, essentially as AutoCad Architecture data extract process does:

    ‘-----------------------------
    Dim DwgName As String
    Dim AcadDbx As AxDbDocument
    Dim DwgFile As String

    On Error GoTo Error_Control
    DwgFile = "<target filespec>"
    Set AcadDbx = GetInterfaceObject("ObjectDBX.AxDbDocument.17")
    AcadDbx.Open DwgFile
    For Each …
    …<code to retrieve block data from the open dwg file>
    Next
    ‘-----------------------------

    However this results in AutoCad Architecture being launched to open the file. My questions are:

    Can TrueView 2008 be used to reveal the object model of a dwg file?

    If so, what type library should be included in the Excel file to do so

    and…

    what VBA code should be substituted for the Set AcadDBX statement above?

    I’d be appreciative of any advice on this, and any suggestions for alternatives within the constraints mentioned in the first paragraph.

    Thanks!

    LB

  2. #2
    AUGI Addict
    Join Date
    2015-12
    Posts
    2,095
    Login to Give a bone
    0

    Default Re: Data extraction with Excel, VBA and...TrueView?

    No, you need AutoCAD to do this unless you get a RealDWG license (if you don't have a budget for AutoCAD then that is definitely out of the question). Oh, and TrueView is free - its not licensed.

    The only option I can see is having somebody else generate the Excel files you need in a useable format.
    If you are going to fly by the seat of your pants, expect friction burns.
    Some say beauty is in the eye of the Beholder... perhaps so, but I've only seen the disintegration beam.
    Everyone else being wrong is not the same thing as being right.

  3. #3
    Active Member
    Join Date
    2008-06
    Posts
    52
    Login to Give a bone
    0

    Default Re: Data extraction with Excel, VBA and...TrueView?

    I agree with Dgorsman... The only other option I see is extremely ugly!

    it is possible to buy a standalone Dwg to Dxf converter and then write a program to read the raw Dxf file and pull the attributes out.

Similar Threads

  1. Replies: 1
    Last Post: 2015-04-29, 01:18 PM
  2. 2014: Data Extraction Table not Updating to the Excel Sheet
    By JHARSH in forum ACA General
    Replies: 0
    Last Post: 2014-08-05, 08:55 PM
  3. Excel Date Extraction
    By LSElite in forum AutoLISP
    Replies: 7
    Last Post: 2013-05-27, 08:26 AM
  4. Attribute extraction to Word or Excel
    By KristiS in forum CAD Management - General
    Replies: 6
    Last Post: 2009-01-06, 09:16 PM
  5. attribute extraction to excel
    By jbortoli in forum VBA/COM Interop
    Replies: 5
    Last Post: 2008-02-07, 01:58 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
  •