the-trooper Posted March 11, 2009 Share Posted March 11, 2009 Hello everyone What i want is to start "dimbaseline" command, select one dimension for baseline (draw it), end that command automatically after one baseline is created, and start "dimcontinue". I did try something, but... (defun c:4 () (command "_dimbaseline") (exit) (command "_dimcontinue" ) And: (defun c:4 () (command "_dimbaseline") (command) (command "_dimcontinue" ) And several variations but, no go. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 11, 2009 Share Posted March 11, 2009 Sorry, I may be looking at this the wrong way, but why not just: (command "_dimcontinue" "_S") (while (> (getvar "cmdactive") 0) (command pause)) Quote Link to comment Share on other sites More sharing options...
the-trooper Posted March 11, 2009 Author Share Posted March 11, 2009 Sorry, I may be looking at this the wrong way, but why not just: (command "_dimcontinue" "_S") (while (> (getvar "cmdactive") 0) (command pause)) Sorry, i know extremely little about LISP, did try to input this code, but main problem is how to end dimbaseline after first base line is created. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 11, 2009 Share Posted March 11, 2009 Doesn't dimbaseline require you to select a dimension? not draw one? Quote Link to comment Share on other sites More sharing options...
the-trooper Posted March 11, 2009 Author Share Posted March 11, 2009 After selecting, base dimension is drawn. So what i want is after that first one is created, to end dimbaseline and go automatically to dimcontinue. Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 11, 2009 Share Posted March 11, 2009 Perhaps; (command "_dimbaseline" "_S" pause pause "" "") (command "_dimcontinue" "_S") (while (> (getvar "cmdactive") 0) (command pause)) Quote Link to comment Share on other sites More sharing options...
the-trooper Posted March 11, 2009 Author Share Posted March 11, 2009 Perhaps; Hmmmm..... Maybe i'm doing something wrong. This doesn't start dimbaseline. Starts with dimcontinue... Quote Link to comment Share on other sites More sharing options...
the-trooper Posted March 11, 2009 Author Share Posted March 11, 2009 How is the whole thing suppose to look? Starting with (defun:.... Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 11, 2009 Share Posted March 11, 2009 Just dump them in a test function like: (defun c:test () (command "_dimbaseline" "_S" pause pause "" "") (command "_dimcontinue" "_S") (while (> (getvar "cmdactive") 0) (command pause)) (princ) ) I think the functions will act differently depending upon whether you already have dimensions in the drawing, or whether the last thing you created was a dimension. Quote Link to comment Share on other sites More sharing options...
the-trooper Posted March 11, 2009 Author Share Posted March 11, 2009 Just dump them in a test function like: That's it! I even modified it a bit so everything is automated. Lee Mac, thanks a million! (defun c:test () (command "_dimbaseline" "_S" pause pause "" "") (command "_dimcontinue" "l") (while (> (getvar "cmdactive") 0) (command pause)) (princ) ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 11, 2009 Share Posted March 11, 2009 Nice one! Glad we finally got there in the end Happy to help Quote Link to comment Share on other sites More sharing options...
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.