Page 1 of 6 12345 ... LastLast
Results 1 to 10 of 54

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

  1. #1
    Member katrinanjim's Avatar
    Join Date
    2008-08
    Location
    Tacoma, WA
    Posts
    3
    Login to Give a bone
    0

    Default VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    I have created a visual basic program in microsoft Excel using ObjectDbx that will currently do the following:
    - Generate a list of AutoCAD dwgs in the current directory (where excel file is saved) and display the list in Excel
    - Search the drawings in the list for a specified block and display the attributes of the block in Excel
    - You can then change the attributes shown in Excel and send them back to the listed AutoCAD dwgs
    - Search the drawings in the list and display all external references in Excel

    This program works fine with the following exceptions:
    Issue #1: When attributes are updated with this program, they will appear left justified until the block is refreshed (known issue)
    Issue #2: The program will only find a single instance of the specified block in each drawing. This issue occurs if you have multiple Paperspace tabs with the specified block inserted in each tab.

    QUESTIONS:
    Has anyone out there been able to resolve Issue #2 using ObjectDbx?
    or
    Will I need to go through the AutoCAD interface and generate selection sets somehow?

    ATTACHMENT:
    I attached my Excel file to this posting for reference. It is a very useful tool given the above issues. I am sure that it could have been a little cleaner but at least I have some commenting. Feel free to post questions or comments regarding the program and I will do my best to answer them.

    Notes:
    - In Excel VBA, need to reference: Microsoft Scripting Runtime, AutoCAD 2008 type Library, AutoCAD/ObjectDbx Common 17.0 Type Library
    - Compatibility: AutoCAD 2008, Excel 2003+
    Attached Files Attached Files

  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: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Please note that I've moved this thread from the ARX forum.

    For issue #2, iterate thru the Layouts collection, using the Block property of the Layout object to gain access to the layout's placed objects.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

  3. #3
    Member katrinanjim's Avatar
    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

    Thank you RobertB. It worked like a champ. I was hoping I would be able to avoid working through the AutoCAD GUI. One less Issue to deal with.

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

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

    What do you mean, "working through the gui"? The layouts collection should be available in odbx.
    C:> ED WORKING....

  5. #5
    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: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Quote Originally Posted by Ed Jobe View Post
    What do you mean, "working through the gui"? The layouts collection should be available in odbx.
    I think that is what they are saying... thanks to my post they can avoid going thru the GUI.
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

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

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

    Quote Originally Posted by RobertB View Post
    I think that is what they are saying... thanks to my post they can avoid going thru the GUI.
    I see, one of those lines that can be read two ways.
    C:> ED WORKING....

  7. #7
    AUGI Addict MikeJarosz's Avatar
    Join Date
    2015-10
    Location
    New York NY
    Posts
    1,497
    Login to Give a bone
    0

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

    Wow. It's great to see someone else has discovered oDBX.

    I wrote a similar program that reads drawings from a list, prints the title block info along with the issue history, looks for certain errors, creates an Excel matrix of every issue and which drawings were in each, then makes a Word doc drawing list to insert into the project specs.

    What needs to be mentioned about oDBX is its speed. The above task, which can take DAYS to do by hand, on a project with 1200 sheets took 50 seconds. Yes, 50 seconds!
    "everything you know is wrong...." -FST

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

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

    Quote Originally Posted by MikeJarosz View Post
    Wow. It's great to see someone else has discovered oDBX.
    There's been lots of conversations in here on odbx. I've even written a cls to address some of it's limitations.
    C:> ED WORKING....

  9. #9
    Member
    Join Date
    2007-07
    Posts
    5
    Login to Give a bone
    0

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

    Can somebody help to itrate between the layout collection

  10. #10
    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: VBA and ObjectDbx - AutoCAD to Excel Attribute Extraction Tool

    Quote Originally Posted by sujit.subramaniam View Post
    Can somebody help to itrate between the layout collection
    Surely you know how to create a For Each ... Next loop?
    R. Robert Bell
    Design Technology Manager
    Stantec
    Opinions expressed are mine alone and do not reflect the views of Stantec.

Page 1 of 6 12345 ... 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
  •