Results 1 to 3 of 3

Thread: Can I use ObjectDBX to "read" an opened drawing?

  1. #1
    Member
    Join Date
    2006-03
    Posts
    29
    Login to Give a bone
    0

    Default Can I use ObjectDBX to "read" an opened drawing?

    I am new to ObjectDBX. I've made some codes working using ObjectDBX to read attributes from BlockReferences defined in a drawing.


    Set objDBX = GetInterfaceObject("ObjectDBX.AxDbDocument.17")
    objDBX.Open ("U:\_Michael\DBX_test2.dwg")

    My routine runs fine when the file I'm trying to read is not currently open. Otherwise, I get the following error: "Run-time error ' -2147467259(80004005)': Method 'Open' of object 'IAxDbDocument' failed".

    But we have the need to read attributes from an open drawing. Am I reaching a dead end with ObjectDBX in this case? Any ideas are greatly appreciated.

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

    Default Re: Can I use ObjectDBX to "read" an opened drawing?

    You need to open the file as read-only. I wrote a class for working with dbx and this has an error handler for this case. See this post to download the class.
    C:> ED WORKING....


    LinkedIn

  3. #3
    Member
    Join Date
    2006-03
    Posts
    29
    Login to Give a bone
    0

    Default Re: Can I use ObjectDBX to "read" an opened drawing?

    Ed:

    Thanks a lot. I finally got the "ReadOnly" to work following your code example. This forum is great!

Similar Threads

  1. Replies: 0
    Last Post: 2012-06-06, 11:54 AM
  2. Replies: 4
    Last Post: 2007-07-12, 05:18 PM
  3. Replies: 8
    Last Post: 2007-04-04, 12:39 PM
  4. Replies: 4
    Last Post: 2004-11-12, 05:40 AM
  5. Lost "Last file opened path"
    By jaustin.69848 in forum AutoCAD General
    Replies: 5
    Last Post: 2004-06-14, 08:02 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
  •