More DBX - (vla-Detach)

Discussion in 'AutoCAD' started by dean_bourke, Mar 1, 2005.

  1. dean_bourke

    dean_bourke Guest

    This time it's vla-Detach.
    Can any DBX guru out there tell me why this won't work?

    Thanks in Advance

    ;;;;;;;


    (defun c:xx (/)
    (setq dbxdoc (vla-GetInterfaceObject (vlax-get-acad-object) "ObjectDBX.AxDbDocument.16"))
    (setq filename "h:\\x.dwg")
    (vla-open dbxdoc filename)
    (vlax-for ENT (vla-get-blocks dbxDOC)
    (if (= (vla-get-isxref ENT) :vlax-true)
    (progn
    (print (vla-get-name ENT))
    (print(setq PATH (vla-get-path ENT)))
    (print ENT)
    (vla-Detach ent); description not provided
    )
    )
    )
    (vlax-release-object dbxdoc)
    )
    ;;;;;;;;;;
     
    dean_bourke, Mar 1, 2005
    #1
  2. dean_bourke

    MP Guest

    afaik, unfortunately dbx can't play with xrefs
    see google for posts regarding this.
    (as I understand it, most xref functions are editor dependent)
    :-(
    If you're wanting to detach, I don't know if you can possibly delete
    references?
    for each item in modelspace
    if item is acadexternalreference
    item.delete?
     
    MP, Mar 1, 2005
    #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.