Copyobjects new owner problem

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

  1. Jeff-FRCH

    Jeff-FRCH Guest

    I have looked through a lot of post on (vla-copyobjects but I can't seem to find the answer I need.

    I am in DWG1 and want to open DWG2 in the background and then copy objects from DWG1 into DWG2 and then close DWG2. All in paperspace, no check required.

    (setq selset (ssget))
    (setq ssarray (SELECTIONSET->ARRAY selset)) ; this converts the selection set into a safe array - Thanks Frank Oquendo.
    (setq tmpdoc (vla-open (vla-get-documents (vla-get-acad-object)) fullname))
    (vla-copyobjects (ACTIVE-DOCUMENT) ssarray tmpdoc)

    The tmpdoc for the new owner doesn't work. I tried the paperspace object and it copied the objects but some of them are viewports and they are corrupt or invalid.

    Any ideas? I also have tried setting DWG2 current and doing a pasteorig but I can't get it to work either. See my post titled 'How to activate/copy/close?'.
     
    Jeff-FRCH, Oct 21, 2004
    #1
  2. Jeff-FRCH

    j.buzbee Guest

    (setq tmpdoc (vla-open (vla-get-documents (vla-get-acad-object)) fullname))
    No! If you've searched like you said you would have found that DWG2 needs
    to be opened with ObjectDBX - not in ACAD. Do a search for ObjectDBX.

    jb
     
    j.buzbee, Oct 21, 2004
    #2
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.