brawleyman Posted November 3, 2008 Posted November 3, 2008 I was wondering how to use dimensions from a lisp routine. I have a lisp that creates a custom dim style, but then I would like for it to start the dimension command. I have the "_dimlinear" in the lisp, but it doesn't allow me to pick my points. What is the command line for allowing a command to get user input in lisp like that? Thanks! Quote
Lee Mac Posted November 3, 2008 Posted November 3, 2008 Anything like this should work: (defun c:dimtest (/) (command "_dimlinear" pause pause pause ) (princ) ) Well, it works for me anyway - but then I am using ACAD 2004, and not 09 like you - therefore the command syntax for a linear dimension may be slightly different. But let me know if this helps in any way Quote
lpseifert Posted November 3, 2008 Posted November 3, 2008 Hard to tell without seeing the code but try this... try putting this after the line calling dimlinear (while (> (getvar 'CmdActive) 0) (command pause)) Quote
brawleyman Posted November 3, 2008 Author Posted November 3, 2008 Awsome! The "pause" worked just the way I wanted it to! Thanks guys! I didn't want to start another thread for this if I didn't have to, but another question I have is about purging. I would like to figure out a lisp that is something like this... If "X" dimstyle exists, purge it. If nonexistent, continue with the lisp." How can I accomplish that? Quote
lpseifert Posted November 3, 2008 Posted November 3, 2008 (if (tblsearch "dimstyle" "x");predicate (command "-purge" "d" "x" "n");if true do this [may need another "n"] (progn ; if false do this (code) );progn );if It may give you an error if the dimstyle is referenced 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.