How to activate/copy/close?

Discussion in 'AutoCAD' started by Jeff-FRCH, Oct 21, 2004.

  1. Jeff-FRCH

    Jeff-FRCH Guest

    I have looked through numerous posts on this topic and have not been able to find an answer to this problem.

    I am in DWG1 and want to open DWG2 in the background and then copy objects from DWG1 into DWG2 and then close DWG2.

    (setq selset (ssget))
    (setq tmpdoc (vla-open (vla-get-documents (vla-get-acad-object)) fullname))
    (vl-cmdf "_.copybase" "0,0" selset "")
    (vla-sendcommand tmpdoc "_.pasteorig\n")
    (vla-activate origdoc)

    It hangs here in DWG2. If I activate DWG1 and then go back to DWG2 the objects will be copied as desired. How can I make the paste work and reset focus to DWG1 and close DWG2?

    I also tried (vla-copyobjects) but I can't get the owner of the copied objects right. See my other post titled 'Copyobjects new owner problem'.
     
    Jeff-FRCH, Oct 21, 2004
    #1
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.