View Full Version : Clean a drawing
gfreddog
2008-03-05, 03:50 PM
I found some code on CADALYST on cleaning a drawing but I have a questions on it:
;DRCLEAN - RUNS AUDIT AND PURGE
(vl-load-com)
(defun c:drclean (/)
(command "zoom" "e"
"audit" "y"
"purge" pause "" "no"
)
(setvar "clayer" "0")
(command "qsave")
(princ)
)
It needs input during the Purge command before it will continue. I can see the need for that but I'd like to tweak this so during PURGE it automatically enters R (For REGAPPS) and then finishes the command.
Is this possible?
rkmcswain
2008-03-05, 05:03 PM
This is what I use.
You could easily add the audit and qsave to the end.
BTW: the (vl-load-com) is not needed. It doesn't hurt anything, but it's not needed for that code.
gfreddog
2008-03-05, 05:20 PM
This is what I use.
You could easily add the audit and qsave to the end.
BTW: the (vl-load-com) is not needed. It doesn't hurt anything, but it's not needed for that code.
Hmm that's actually a different way of looking at it. Very nice.
thanks for the input.
This is what I use.
You could easily add the audit and qsave to the end.
BTW: the (vl-load-com) is not needed. It doesn't hurt anything, but it's not needed for that code.
(repeat 3 (command "._purge" "_A" "*" "_N"))
Hey R.K. does this purge regapps?
I tried running it but I couldn't see where it did.
***** Never mind I found that it didn't, I stole it and modified it so it does.
Here's what I use:
(defun c:pp ()
(setq ce (getvar "cmdecho"))
(setvar "cmdecho" 0)
(command "layer" "s" "0" "")
(command "zoom" "e" "zoom" ".9x" )
(repeat 3
(command "._purge" "_A" "*" "_N")
(command "purge" "regapps" "" "n"))
(setvar "cmdecho" ce)
(command "_qsave")
(princ)
)
ccowgill
2008-03-06, 12:42 PM
this is what I use
(defun c:sup (/ bss)
(if
(setq bss (ssget "X"
'((-4 . "<AND")
(0 . "insert")
(2 . "$rma$,PROJ_NAM")
(-4 . "AND>")
)
)
)
(command "erase" bss "")
)
(command "-purge" "r" "" "n")
(command "-purge" "a" "" "n")
(command "-purge" "a" "" "n")
(command "audit" "Y")
(command "-purge" "a" "" "n")
)
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.