Removing object locks...

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

  1. Sorry for the cross post. I have been trying to get the following to work
    in MAP 6. Can anyone help me with what is next? I've tried what the
    documentation says but it does not work. The only way it works for me is to
    actually use the ADEDWGMAINT dialog box to perform the action. I need to
    eliminate user interaction at this point because I'm performing the task on
    a listing of drawings that all have locks... Any ideas?

    I am looking for a way to remove the locks from objects as if I were going
    into ADEDWGMAINT. I tried to follow the help file but it does not seem to
    be working. I have tried '(command "_.ADEDWGMAINT" ...' but it doesn't seem
    to work that way either. Does anyone already have a snippet of code to
    unlock objects?


    (mapcar 'ade_dwgdeactivate (ade_dslist))
    (setq ade_tmpprefval (ade_prefgetval "ActivateDwgsOnAttach"))
    (ade_prefsetval "ActivateDwgsOnAttach" T)
    (ade_dsattach (strcat "c:\\amc700\\scratch\\" ProcessName))
    (ade_prefsetval "ActivateDwgsOnAttach" ade_tmpprefval)
    ;_ade_qry
    (ade_qryclear)
    (ade_qrysettype "draw")
    (ade_qrydefine '("" "" "" "Location" ("all") ""))
    (ade_qryexecute)
    (ade_userset "SUPERUSER" "SUPERUSER")
    (ade_dwgunlock (ade_dwggetid (strcat "c:\\amc700\\scratch\\" ProcessName)))
    ;_unlock objects
    ???


    Thank you!

    t
     
    cyberstrategist, Aug 23, 2004
    #1
  2. cyberstrategist

    Jim Claypool Guest

    (setvar "cmddia" 0)
    (command "_.adedwgmaint")

    ...answer the prompts here

    (setvar "cmddia" 1)
     
    Jim Claypool, Aug 23, 2004
    #2
  3. I've tried that already. Although, it looks like all is unlocked when I
    verify it by going into ADEDWGMAINT the locked objects are still present in
    the drawing...

    Any other ideas?
     
    cyberstrategist, Aug 23, 2004
    #3
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.