Performing queries in VB/VBA...

Discussion in 'AutoCAD' started by cyberstrategist, Aug 30, 2004.

  1. Does anyone have an example of how to perform the ADEDWGMAINT command via VB
    or VBA? Seems that the command line version of this does not work for
    unlocking objects. [The user is actually *UNKNOWN USER* that has the
    objects locked.] We're having a difficult time trying to find a good
    solution that works on queried drawings, queried drawings being the key
    here.

    Below is the command that works using the GUI in MAP 6:

    Current sequence:
    ADEDWGMAINT > Select All > User List > Select All > Remove Locks > Exit


    Any ideas?
     
    cyberstrategist, Aug 30, 2004
    #1
  2. You need to recreate the dialog box's functionality through the API where
    you can pass it user information such as username so the system can verify
    you have superuser privileges.

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Aug 30, 2004
    #2
  3. We've tried using the API supplied with MAP 6, at least the ADE API they
    supplied and we tried using the command line equiv. without success. It
    just plain does not work. Now I'm looking to see if anyone else has run
    into this and if there are any ideas out there. I do have a support request
    in to Autodesk but they seem to be slow to respond on this one....

    Any ideas?
     
    cyberstrategist, Aug 30, 2004
    #3
  4. Sorry, beyond my Map-ism now =)

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Aug 30, 2004
    #4
  5. Any ideas on this? Did I stump everybody? ;-)
     
    cyberstrategist, Aug 31, 2004
    #5
  6. cyberstrategist

    Warren M Guest

    Hello cyberstrategist.

    I just tried this out in Map 3D 2005, with the same results...
    It would appear the command line version of the Drawing Maintenance commands are 'broken'

    I'm curious though, in the bigger picture, why/how are these objects getting locked that you are required remove the locks manually? Map usually takes care of managing the locks unless there is a system crash and it doesn't get a chance to clean up the dwk file?

    Warren M
     
    Warren M, Aug 31, 2004
    #6
  7. cyberstrategist

    LochDhu Guest

    As Warren mentioned, the locks *should* be cleaned up by the Map application. If the application terminates (power outage) then the locks remain.

    The only way to unlock the objects at this point is to strip the objects of XDATA with application name ADE_ENTITY_LOCK. But this has to be done on the Source Drawing itself, not from the Project Drawing - which you are trying to do. ADEDWGMAINT gives you ability to remove locks from the Project Drawing, but it does not work at the command line, as you are aware.

    If you provide us with a little more detail as to why you are wanting to do this then perhaps we can offer some alternatives.

    Scott
     
    LochDhu, Aug 31, 2004
    #7
  8. I was wondering when you'd show up Scott =)

    -- Mike
    ___________________________
    Mike Tuersley
    CADalyst's CAD Clinic
    Rand IMAGINiT Technologies
    ___________________________
    the trick is to realize that there is no spoon...
     
    Mike Tuersley, Aug 31, 2004
    #8
  9. I'll try to kill both posts with this one...

    We haven't been able to track down the scenario in which the locks are being
    created yet so we're needing to deal with the symptoms and not the cause.
    We're still going through the processes here to see what is the cause.

    To answer the question that you post though....

    System crashes ... There hasn't been any system crashes on the drawings that
    we're dealing with. There isn't a premature exit to cause the object locks.

    So, at this point, we have no clear indicator to point us in the right
    direction for the sequence of events that is making these objects remain
    locked.

    So, I'm still fishing at this point....


    application. If the application terminates (power outage) then the locks
    remain.
    of XDATA with application name ADE_ENTITY_LOCK. But this has to be done on
    the Source Drawing itself, not from the Project Drawing - which you are
    trying to do. ADEDWGMAINT gives you ability to remove locks from the
    Project Drawing, but it does not work at the command line, as you are aware.
    do this then perhaps we can offer some alternatives.
     
    cyberstrategist, Aug 31, 2004
    #9
  10. cyberstrategist

    Warren M Guest

    "We haven't been able to track down the scenario in which the locks are being created yet "

    Locks are created when queried objects are modified and added to the saveset.

    Warren M
     
    Warren M, Aug 31, 2004
    #10
  11. I worded that incorrectly... We know when and how the locks are being
    created but we don't know the scenario when the locks become irremovable...
     
    cyberstrategist, Sep 1, 2004
    #11
  12. Are there any ideas out there?
     
    cyberstrategist, Sep 1, 2004
    #12
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.