Removing proxy objects

Discussion in 'AutoCAD' started by Jim Claypool, Aug 4, 2003.

  1. Jim Claypool

    Jim Claypool Guest

    Does anybody know of a way to find and remove proxy objects in a drawing
    using lisp or vba?
     
    Jim Claypool, Aug 4, 2003
    #1
  2. Jim Claypool

    Scot-65 Guest

    Jim,

    1) Open the Options and tab until "Do Not Show Proxy Graphics".

    2) Wblock the drawing ("thaw" and/or "on" and/or "unlock" all the layers).


    Scot-65
     
    Scot-65, Aug 4, 2003
    #2
  3. Jim Claypool

    John Uhden Guest

    I tried this, but I sorta remember it doesn't work completely...
    (defun c:KillProxy ( / *error* ss i n proxy)
    (vl-load-com)
    (defun *error* (error)
    (vla-endundomark *doc*)
    (cond
    ((not error))
    ((wcmatch (strcase error) "*QUIT*,*CANCEL*"))
    (1 (princ (strcat "\nERROR: " error)))
    )
    (princ)
    )
    (or *acad* (setq *acad* (vlax-get-acad-object)))
    (or *doc* (setq *doc* (vla-get-ActiveDocument *acad*)))
    (vla-endundomark *doc*)
    (vla-startundomark *doc*)
    (or
    (and
    (setq i 0 n 0)
    (setq ss (ssget "X" '((0 . "*PROXY*"))))
    (repeat (sslength ss)
    (setq proxy (vlax-ename->vla-object (ssname ss i)))
    (and
    (not
    (vl-catch-all-error-p
    (vl-catch-all-apply 'vla-delete (list proxy))
    )
    )
    (setq n (1+ n))
    )
    (setq i (1+ i))
    )
    (princ (strcat "\nDeleted " (itoa n) " proxy objects."))
    )
    (princ "\nNo proxy objects found.")
    )
    (*error* nil)
    )
     
    John Uhden, Aug 5, 2003
    #3
  4. Jim Claypool

    Gary J. Orr Guest

    This may get all of the "with real graphics" proxy entities but it doesn't
    touch the "no graphics" proxy dictionary entries. You would need to add a
    similar loop to go through the dictionaries and delete (with entdel and/or
    dictdel). Unfortunately even some of these can't be deleted in the case of
    LDT3 (and previous) objects and it gets real tricky real fast.

    --
    Gary J. Orr
    CADD Manager
    (218) 279-2421


    LHB Engineers and Architects
    21 West Superior Street, Suite 500
    Duluth, Mn 55802
    (218) 727-8446
    www.LHBcorp.com
     
    Gary J. Orr, Aug 5, 2003
    #4
  5. Jim Claypool

    John Uhden Guest

    Thank you, Gary, for reminding me of the land mines.
     
    John Uhden, Aug 6, 2003
    #5
  6. Jim Claypool

    Jim Claypool Guest

    Thanks for all of the suggestions, guys. So far nothing has worked
    entirely.
    I am about ready to save as r12 to clean it up. The problem with that
    approach is
    losing all of the db links. But I can relink from xdata that I stored.
     
    Jim Claypool, Aug 6, 2003
    #6
  7. Jim Claypool

    Jimmy B Guest

    Jimmy B, Aug 6, 2003
    #7
  8. Jim Claypool

    Ian A. White Guest

    Well I just had to remove a whole stack of them from a survey drawing.

    What I did was use the old routine SSX (FILTER will do the same thing)
    and searched for objects of the type *PROXY*. I exploded these, then
    searched for the them again and deleted them - no more proxy objects.

    You should be able to do this with lisp.

    --

    Regards,

    Ian A. White, CPEng

    WAI Engineering
    Sydney 2000
    Australia

    Ph: +61 418 203 229
    Fax: +61 2 9622 0450
    Home Page: www.wai.com.au
     
    Ian A. White, Aug 7, 2003
    #8
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.