View Full Version : Kill Ashade help
BCrouse
2005-05-13, 01:28 AM
I have been trying to figure out why this Kill Ashade lisp will not not work all the time. It works in one dwg and not in the next. Can someone please help me out?
Thank you for your help.
Brad
lance.81922
2005-05-13, 02:22 AM
It looks OK, at least it's not obvious why it wouldn't work. How are you loading it? In other words, if you are loading it with ACAD.LSP and are using the Multiple Document Interface (i.e., you can have more than one drawing open at one time), then the program loads only once, so it would work on the first drawing but not the second or third etc. To load it in EVERY drawing you need to either add it to your Startup Suite or to your ACADDOC.LSP file.
When you say "it doesn't work", what exactly do you mean? Does it do anything? Is it loading? Are you loading it manually, or automatically? If automatically, HOW? Do you get an error message? Does the first line (the one that unlocks the ASHADE layer) work but nothing else?
If you aren't sure it's loading, you can put a (princ) statement, like (princ "\nKILLASHADE loaded. "), after the closing (defun) paren, like this:
(defun C:KILLASHADE()
(command "-layer" "U" "ASHADE" "")
(command "_.erase" (ssget "x" '((8 . "ASHADE"))) "")
(command "_.purge" "B" "AVE*" "N")
(command "_.purge" "LA" "ASHADE" "N")
)
(princ "\nKILLASHADE loaded. ")
That way you can see whether it loads with each drawing. Give us more info!
RobertB
2005-05-13, 04:12 AM
VPorts that have specifically frozen layers for that viewport used to cause this problem in older versions of AutoCAD. Are these old drawings?
kennet.sjoberg
2005-05-13, 07:56 AM
It is NOT only a layer problem, there may be a lot of invisible block in the layer "ASHADE"
Block named : "AME_NIL" "AME_SOL" "AVE_GLOBAL" "AVE_RENDER" and a few more
You have to erase them first, purge them, and then purge the layer.
: ) Happy Computing !
kennet
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.