TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: terrycadd on August 21, 2007, 10:26:28 AM

Title: Issue with Purge
Post by: terrycadd on August 21, 2007, 10:26:28 AM
We are cleaning up our block library drawings and came across a stubborn :x drawing that will not purge out the following. A block named GENAXEH and dimension styles AM_ANSI, AM_ANSI$SF and AM_ANSI$SH.

So far we tried purge all, wblocking the drawing, dxfout and dxfin, copyclip the drawing into a new drawing.  All methods tried still have the block and dimstyles in the new drawing. 

I just found out that even if I draw just a new line and copyclip it into a new drawing, it also carried over those dimstyles.  Any ideas or experience with this issue would be appreciated.
Title: Re: Issue with Purge
Post by: Keith™ on August 21, 2007, 10:37:50 AM
It looks like it might be something with a vertical application. Can you post the offending drawing?
Title: Re: Issue with Purge
Post by: T.Willey on August 21, 2007, 11:02:29 AM
This might help. (http://www.theswamp.org/index.php?topic=17547.0)  You can look for the routine '_FindRefs' on the first page.  It helped me a lot to see what was wrong with some of my drawings that wouldn't let me purge stuff.
Title: Re: Issue with Purge
Post by: terrycadd on August 21, 2007, 11:11:05 AM
It looks like it might be something with a vertical application. Can you post the offending drawing?
Yes, that might help.  Here it is.  It's not a very large drawing.
Title: Re: Issue with Purge
Post by: T.Willey on August 21, 2007, 11:14:49 AM
Purged everything for me. '06 Electrical.
Quote
Deleting block "GENAXEH".
1 block deleted.

Deleting dimension style "AM_ANSI".
Deleting dimension style "AM_ANSI$SF".
Deleting dimension style "AM_ANSI$SH".
Deleting dimension style "DS-1".
Deleting dimension style "DS-1$2".
Deleting dimension style "DS-1$3".
Deleting dimension style "DS-1$4".
Deleting dimension style "DS-1$6".
Deleting dimension style "DS-12$2".
Deleting dimension style "DS-12$3".
Deleting dimension style "DS-12$4".
Deleting dimension style "DS-12$6".
12 dimension styles deleted.
Title: Re: Issue with Purge
Post by: Guest on August 21, 2007, 11:22:07 AM
Worked fine for me using MEP '08.
Title: Re: Issue with Purge
Post by: terrycadd on August 21, 2007, 11:26:06 AM
Tim, I just read the threads in your referral link.  It mostly is about layers.  Right?   What kind of magic function :pissed: did you just wave over my drawing to get rid of those pests?  Can I have some of it?

Matt W, Please re-send Purged.dwg for AutoCAD 2006.  It reports "Drawing file is not valid, when I try to open it.
Thanks
Title: Re: Issue with Purge
Post by: Guest on August 21, 2007, 11:28:26 AM
Tim, I just read the threads in your referral link.  It mostly is about layers.  Right?   What kind of magic function :pissed: did you just wave over my drawing to get rid of those pests?  Can I have some of it?


I used "-PURGE".
Title: Re: Issue with Purge
Post by: T.Willey on August 21, 2007, 11:31:37 AM
Tim, I just read the threads in your referral link.  It mostly is about layers.  Right?
If you use the _FindRefs routine that Michael provided, it searches for handles, so you would supply the block definition handle, and the dim style handles, and it will then give back the list of handles that reference the supplied handles, in a list of lists.

What kind of magic function :pissed: did you just wave over my drawing to get rid of those pests?  Can I have some of it?


I used "-PURGE".
Same here.
Title: Re: Issue with Purge
Post by: terrycadd on August 21, 2007, 11:43:51 AM
Attached is the original with the title block removed.  No luck using -purge.  I was begining to think that -purge had better features than the dialog version of purge, but maybe not.
Title: Re: Issue with Purge
Post by: Guest on August 21, 2007, 11:58:31 AM
That mystery block of yours is being referenced into one the dimension styles that you can't purge.  I wblock'd everything out, -purge'd, then the dimstyles and block were gone.
Title: Re: Issue with Purge
Post by: T.Willey on August 21, 2007, 12:05:58 PM
Here is what is returned by Michael's routine.
Quote
(
 ("145C2" "0000A" "145B8")
 ("145BD" "0000A" "145B8")
 ("145B9" "0000A" "145B8")
 ("145BE" "1A68F" "1A690" "1A691")
)
And here is what each is.  Ignore the reference to layer, as it's not what it's looking at here.
Quote
Layer: AM_ANSI$SH
 Object type [ count ]: ACAD_PROXY_OBJECT [ 1 ]
 Object type [ count ]: TABLE [ 1 ]
 Layer: AM_ANSI$SF
 Object type [ count ]: ACAD_PROXY_OBJECT [ 1 ]
 Object type [ count ]: TABLE [ 1 ]
 Layer: AM_ANSI
 Object type [ count ]: ACAD_PROXY_OBJECT [ 1 ]
 Object type [ count ]: TABLE [ 1 ]
 Layer: GENAXEH
 Object type [ count ]: ENDBLK [ 1 ]
 Object type [ count ]: CIRCLE [ 1 ]
 Object type [ count ]: BLOCK [ 1 ]
Title: Re: Issue with Purge
Post by: terrycadd on August 21, 2007, 12:14:58 PM
Matt, that extra step, (wblock / -purge) did the trick.
Thank you all for your help. 
Title: Re: Issue with Purge
Post by: Guest on August 21, 2007, 01:21:51 PM
I hate when I run into those situations.

Glad you got it all straightened out!
Title: Re: Issue with Purge
Post by: KewlToyZ on August 22, 2007, 01:37:05 PM
I run a routine for purging files:

Code: [Select]
(defun c:q ()
   ;(command "audit" "y")
   ;(command "qsave")
   (command "purge" "all" "*" "n")
   (command "purge" "all" "*" "n")
   (command "purge" "all" "*" "n")
   ;(command "qsave")
   (command "TILEMODE" 1)
   ;(command "Zoom" "Extents")
   (command "qsave")
   ;(command "close")
   (princ)
)
(defun c:qw ()
   (command "audit" "y")
   (command "qsave")
   (command "purge" "all" "*" "n")
   (command "purge" "all" "*" "n")
   (command "purge" "all" "*" "n")
   (command "qsave")
   (command "TILEMODE" 1)
   ;(command "Zoom" "Extents")
   (command "qsave")
   ;(command "close")
   (princ)
)
(defun c:qwe ()
   (command "TILEMODE" 1)
(command "Zoom" "Extents")
   (command "qsave")
   (command "audit" "y")
   (command "qsave")
   (command "purge" "all" "*" "n")
   (command "purge" "all" "*" "n")
   (command "purge" "all" "*" "n")
   (command "qsave")   
   (command "close")
   (princ)
)