comcu Posted July 8 Share Posted July 8 Quote Hi, when I type “DIM” into the command line and type “G” it calls the dim align command. When I try to use this same logic in lisp or a macro I get “Dim:” at the command Line. Any ideas how to force lisp code to call the correct dim command? Thanks in advance (defun c:aligndimension () (command "_DIM") (princ) ) Quote Quote Link to comment Share on other sites More sharing options...
Tharwat Posted July 8 Share Posted July 8 Simply you can enable the dimensions toolbar which obtains many dim commands. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted July 8 Share Posted July 8 What's the main intent of the code? I could type DIM>G much faster than aligndimension. But to answer your inquiry... (defun c:aligndimension () (command "_DIM" "Align") (princ) ) Quote Link to comment Share on other sites More sharing options...
comcu Posted July 8 Author Share Posted July 8 Hi thanks tried that before and it didn't work. I get this in the command line Quote _Dim Quote Dim: Align Quote Link to comment Share on other sites More sharing options...
comcu Posted July 8 Author Share Posted July 8 To answer your other question I will add a alias and call it AD but I like to keep the full name just incase I need to search for the command later. I had noticed that the standard command doesn't perform how I expected on ordinate dim. It does align the dim but not the text so working my way through a lisp to allow me to pick a point I want all the ordinate dim text to align. Then select ordinates them grab the dxf 11 value and use it to change only the x value (to the original pick point) which will effectively line up the text of all ordinate dim no mater the length of text. Working thru it now. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted July 8 Share Posted July 8 It works on my computer, using the G shortcut did not. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 8 Share Posted July 8 My $0.05 (defun c:dima ( / ) (command "DIM" "aligned" (getpoint "\nPick pt 1 ")(getpoint "\nPick pt 2 ")(getpoint "\nPick pt 3 ") "" "exit") ) 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.