TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started 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.
-
It looks like it might be something with a vertical application. Can you post the offending drawing?
-
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.
-
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.
-
Purged everything for me. '06 Electrical.
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.
-
Worked fine for me using MEP '08.
-
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
-
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".
-
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.
-
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.
-
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.
-
Here is what is returned by Michael's routine.
(
("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.
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 ]
-
Matt, that extra step, (wblock / -purge) did the trick.
Thank you all for your help.
-
I hate when I run into those situations.
Glad you got it all straightened out!
-
I run a routine for purging files:
(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)
)