Does anybody know of a way to find and remove proxy objects in a drawing using lisp or vba?
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
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) )
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
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.
If you upload or email a sample drawing someone among us might give it a try. Since there are so much to consider it's hard to say without seeing th drawing. -- Best Regards, Jimmy B CAD and Database Developer Manager at www.pharmadule-emtunga.com Take a look at the trial version of SmartPurger (now for AutoCAD 2004) or download some freeware at www.jtbworld.com More on AutoCAD 2004; www.jtbworld.com/autocad2004.htm www.jtbworld.com/autocad2004tips.htm
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