Page 4 of 6 FirstFirst 123456 LastLast
Results 31 to 40 of 54

Thread: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

  1. #31
    Administrator Ed Jobe's Avatar
    Join Date
    2000-11
    Location
    Turlock, CA
    Posts
    6,396
    Login to Give a bone
    0

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Is it just this one sub that's not working? Check the project's references for missing type libraries (Tools>References).
    C:> ED WORKING....

  2. #32
    Member
    Join Date
    2007-04
    Posts
    2
    Login to Give a bone
    0

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    I did these from the reference:

    uncheck - MISSING: AutoCAD 2008 type Library
    check - AutoCAD 2010 type Library
    check - AutoCAD/ObjectDBX Common 18.0 Library

    but still doest work, error "Problem Loading Application"

    also, the "AutoCAD 2010 type Library" is using this file "acax18enu.tlb" and the 'AutoCAD/ObjectDBX Common 18.0 Library' is using this file 'axdb18enu.tlb' both in the autodesk shared folder. Shouldnt it be using the from the this file 'axdb.dll' in the AutoCAD 2010 root folder? Honestly, idnno anything about vba but just guessing.

    Many Thanks

  3. #33
    Woo! Hoo! my 1st post
    Join Date
    2010-05
    Posts
    1
    Login to Give a bone
    0

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Hi cftorres,

    I had the same issue and I have since altered the VBA code so that it now works okay on AutoCAD 2010 using axdb18.dll (ObjectDBX Common 18.0 Library). Please let me know if this has sorted out your issue.

    I also had an issue with Excel truncating leading zeros off attribute text that were in the blocks that I was referencing. The code is now modified so that it changes the format of the cell to text immediately prior to inserting the attribute text.

    Best Regards,

    Colin
    Attached Files Attached Files

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

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Hi

    Just found this thread and tried the excel on autocad 2011 64bit and got an error. The program opens and runs on Excel 2010 but gives complile error "cannot find project or library". The first line "Function dbxOpen(Path As String, DwgNam As String) As AxDbDocument" is highlighted.

    is there a way to run it with Autocad 2011?

    thanks

    Roby

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

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Go to Tools>References and you will notice that an entry that starts with "MISSING:". Uncheck that an find the version that ships with your version of acad. The name will be similar but end with a different number.
    C:> ED WORKING....

  6. #36
    Member
    Join Date
    2010-03
    Posts
    2
    Login to Give a bone
    0

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Thanks for the help.

    I set both autocad 2011 64bit and Office Excel 2010 64bit to the same ( Autocad/ObjectDBX Common 18.0 type Library)

    It is actually list at first as "AXDBLib" down the list. After picking it changes its name to "Autocad/ObjectDBX Common 18.0 type Library"

    this is the same in both VBA editors.

    The excel program finds the drawings and ceates the list OK.

    When I pick the "Get Attributes" button I get an error " Sub or function not defined" and the debug.printuger jumps to this line:

    Set AcadDbx = GetInterfaceObject("ObjectDBX.AxDbDocument.18")

    with the word GetInterfaceObject highlighted in blue.

    The little spinng wheel cursor comes on and stays on even after resetting the code with the blue square button, it stays spinning until I exit excel.

    This has me confused because I have programmed in autocad and excel prior to 2007 and that code still works with the newer type libraries.

    I tried it with and without acad 2011 running, and there was no change.

    Otherwise a very nice program, I would use it.

    thanks again.

    Roby

  7. #37
    Member
    Join Date
    2008-08
    Location
    Tacoma, WA
    Posts
    3
    Login to Give a bone
    0

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    This post certainly has been going for a while. I actually was trying to figure out why my utility wasn't working, did a search on Google, and got sent back to my original post....

    Anyways, here is what fixed the problem with me. I downloaded the Autocad 2011 Object Enabler package from Autodesk (since they are "phasing out" vba).
    http://www.autodesk.com/vba-download
    or do a search on the Autodesk website for "VBA support in Autocad 2011"

    Then I revised my references to point to the updated dlls (not sure this is required). I am uploading the file again since I have made some tweaks here and there. That darn hourglass glitch is hopefully gone now. Sorry for the sloppy coding. That is what you get when an engineer programs.

    I am sure that I will eventually have to put the time in and convert over to ".NET". After Autocad 2012, VBA support is probably going away...bummer.

    Also note, the utility will take up less space and work better in newer versions of office if you save it as a "Macro Enabled" file (ie *.xlsm).
    Attached Files Attached Files
    Last edited by katrinanjim; 2011-12-30 at 05:30 AM. Reason: I revised the utility to incorporate the Attribute truncating issue corrected by C. White.

  8. #38
    Member
    Join Date
    2010-03
    Posts
    2
    Login to Give a bone
    0

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Hi Jim,

    i got it to work a few times, but only with a few tweaks:

    I had to change the path for the regserv line to current path not 2004.

    I added 2 mode autodesk .dll into the autodesk VBAide references

    and I found by luck that it works with autocad running, but hangs trying to open the axdb.dll just from excel.

    I think this a "feature" related to the 64 bit Office 2010 and Autocad 2011.

    Other Apps are not allowed to access the autocad ObjectDBX directly any longer. ( I think I read this somewhere)

    Maybe an instance of autocad can be started from excel code and run invisible???

    I am going to have to .NET as well, Jerry winters ahs a book and has a few lectures archive at autodesk university website. Migth be the places to start from. I sure miss VBdesign web site with the LLama, back in the day I learned a lot there.

    I will help you test this some more if I can, but it is late here.

    thanks again

    Roby

  9. #39
    Active Member
    Join Date
    2013-06
    Posts
    72
    Login to Give a bone
    0

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    This is some thread necromancy but I wanted to comment that this Excel file is absolutely fantastic. I couldn't get either of the ones that ended in a year to work, but I tried the one posted by colin.b.white with no year at the end; thank you SO MUCH.

    I can now modify thousands of drawings in MINUTES (well, my labour part takes minutes, the computer plugs on for more than minutes ... but I have a PC dedicated specifically for this task); I couldn't figure out how to do what you did after MANY hours of searching, so thank you.

  10. #40
    Woo! Hoo! my 1st post
    Join Date
    2013-07
    Posts
    1
    Login to Give a bone
    0

    Default Re: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    I would like to use it!
    But i get error-messages in Excel 2010: compilation errors.
    Can someone fix that problem? I'm not a macro expert

Page 4 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. CP214-3: All Things Extraction: From AutoCAD to Databases, Excel, and XML Using .NET
    By Autodesk University in forum Customization and Programming
    Replies: 0
    Last Post: 2014-12-01, 02:08 AM
  2. Help needed with Attribute extraction and import into MS Excel
    By Lee Buckmaster in forum Productstream - General
    Replies: 0
    Last Post: 2012-04-30, 08:23 PM
  3. Attribute extraction to Word or Excel
    By KristiS in forum CAD Management - General
    Replies: 6
    Last Post: 2009-01-06, 09:16 PM
  4. attribute extraction to excel
    By jbortoli in forum VBA/COM Interop
    Replies: 5
    Last Post: 2008-02-07, 01:58 PM
  5. Block attribute extraction to an AutoCAD Table
    By DFlynn in forum AutoCAD Tables
    Replies: 2
    Last Post: 2006-02-13, 01:41 AM

Posting Permissions

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