brawleyman Posted November 6, 2008 Posted November 6, 2008 I am trying to figure out how to purge a dimension style in drawings if it exists. It will be a part of a larger lisp that I have created. I am new to Lisp and trying to learn the if-then expression. Any suggestions? Thanks. Quote
Lee Mac Posted November 6, 2008 Posted November 6, 2008 Hi Brawley, Not quite sure what you're after, but maybe something along these lines? (defun c:dimpurg () (setvar "cmdecho" 0) (command "-purge" "D" "" "Y") (setvar "cmdecho" 1) (princ) ) Let me know if this helps at all Quote
brawleyman Posted November 7, 2008 Author Posted November 7, 2008 Oh, thanks lpseifert. Sorry, I didn't check the other thread recently to see if anyone had replied to it. I just tried your code to purge the style. What command would I put in for the "false" statement? Basically, if the dimstyle exists, purge it, and if the dimstyle doesn't exist, then move on with the rest of the lisp. Thanks. ***Edit*** Sweet! I got it figured out! I don't have to have the "or else" statement. I just have the code set up so that if there happens to be a dimension style by a certain name, it will purge it, if not, move on with the Lisp routine. Thanks so much lpseifert! You have been a really big help to me! Now, if only I can create a lisp routine that will make Autocad design and do everything for me... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.