vla-copyobjects anomoly

Discussion in 'AutoCAD' started by rgood, Sep 29, 2004.

  1. rgood

    rgood Guest

    I am attempting to copy a dictionary from another document using dbx. After I copy the dictionary to the current document, I notice it has copied two dictionaries. one with the same name as the original, and one anonymous dictionary
    Is there a method to avoid copying two dictionaries, or is this a known issue?

    (vla-copyobjects
    dbxDoc
    (vlax-safearray-fill
    (vlax-make-safearray vlax-vbobject '(0 . 0)) ;_ end of vlax-make-safearray
    (list
    (vla-item (vla-get-dictionaries dbxDoc) gDictMaster)
    ) ;_ end of list
    ) ;_ end of vlax-safearray-fill
    (vla-get-dictionaries gActiveDoc) ;_Copy to current doc dictionaries table
    ) ;_ end of vla-CopyObjects

    (vlax-release-object dbxDoc)

    ;;ensure new dictionary has been copied, then rename
    ;;!!!PROBLEM WITH COPYING OVER TWO DICTIONARIES, ONE IS AN
    ;; UNNAMED DICTIONARY *A1 WHICH CAN BE RENAMED

    (if (setq vDict (vl:getdict gActiveDoc gDictMaster))
    (progn
    (vla-put-name vDict "NewDict_DB");_here i rename the anonamous dictionary
    (vl:deldict "NewDict_DB");_here i delete the xtra dictionary??
    ) ;_end progn
    ) ;_end if


    Robert Good.
     
    rgood, Sep 29, 2004
    #1
  2. rgood

    j.buzbee Guest

    Is this in a vertical application like ADT? I know in Architectural Desktop
    that *A1, *A2 etc represent extension dictionaries associated with a
    "collection" dictionary. Might this be the case? Is this a dictionary that
    you created and therefore know for a fact all of it's properties? Sorry if
    these are bloody obvious questions.

    I use the 'copyobjects method to copy AEC dictionaries and have never seen
    eronious information copied.

    jb
     
    j.buzbee, Sep 29, 2004
    #2
  3. rgood

    rgood Guest

    jb,
    This is vanilla Autocad 2005 with a dictionary I created in the target (dbx doc) drawing.

    I will check my dictionary creation function to make sure it is not creating the dictionary with an extension dictionary. I know i did not specify this, wondering if it does it by default.


    Thanks.
    Robert Good.
     
    rgood, Sep 29, 2004
    #3
  4. rgood

    rgood Guest

    jb,
    just verified. The dictionary that I created in the dbx doc does not have an extension dictionary.

    Robert Good.
     
    rgood, Sep 29, 2004
    #4
  5. rgood

    j.buzbee Guest

    Hmm. Sorry, I'm out of suggestions. I copy Text Styles, Dimstyles, Layers,
    Views, UCS's, Blocks, and AEC objects galore but haven't run into this . . .
    sorry I can't be of more help.

    jb
     
    j.buzbee, Sep 29, 2004
    #5
  6. rgood

    rgood Guest

    jb,
    no problem, Thanks for giving it some consideration.

    Robert Good.
     
    rgood, Sep 29, 2004
    #6
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.