Is ther a way to purge all civil 3d styles in a macro or lsp. -purgestyles does not seems to work. I have not worked with lsp for a while just getting back into it again.
I have seen this used for purge (vla-purgeall File) and (vla-AuditInfo File T) for audit can we somethging like this with purgestyles or some how echo off the dialog that comes up. seemslike purgng styles should be just as simple a an audit or purge, but is seem more complex.
Thanks, any help would great.
Lisa
@lisaj98052 wrote:
Is ther a way to purge all civil 3d styles in a macro or lsp.
Lisa
Something like this should work.
(defun c:foo () (repeat 4 (vl-cmdf "._AECCPURGESTYLES") (while (eq (logand (getvar "cmdactive") 1) 1) (command "_Y") ) ) )
Thanks R.K.
Tried your lsp last night, but is stops at the dialog, is there a way to echo off the dialog or pypass it. this the problem I have been having I work a lisp and got to the same place, "the dreaded dialog" wants a ok, or a return
(defun c:foo ()
(repeat 4
(vl-cmdf "._AECCPURGESTYLES")
(while (eq (logand (getvar "cmdactive") 1) 1)
(command "_Y" "" "")
)
)
)
Never simple is it.
Thanks Lisa
My goal is to purge all unused styles from several files with a macro or lisp. don't want to open 100 files.
thanks, Lisa
Hi @rkmcswain. Chiming in on this a mere 9 years after your post.
I have noticed this code causes a "Really want to discard all changes to drawing? <N>" error when run as part of a .bat cleanup routine as my code attempts to "quit." The other method...
(repeat 4(command "purgestyles" ""))
... doesn't cause the error, but instead returns "Unknown command..." for the remainder of the "repeat" count, once all styles have been purged.
Not sure if I have a question here or if just wanted to let you know, as I'll have to use the the code that functions fully, even if it is bad practice. But, I won't turn down any input you may have.
Hi
Looking at this it may help you