comcu Posted July 8, 2024 Posted July 8, 2024 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
Tharwat Posted July 8, 2024 Posted July 8, 2024 Simply you can enable the dimensions toolbar which obtains many dim commands. Quote
SLW210 Posted July 8, 2024 Posted July 8, 2024 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
comcu Posted July 8, 2024 Author Posted July 8, 2024 Hi thanks tried that before and it didn't work. I get this in the command line Quote _Dim Quote Dim: Align Quote
comcu Posted July 8, 2024 Author Posted July 8, 2024 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
SLW210 Posted July 8, 2024 Posted July 8, 2024 It works on my computer, using the G shortcut did not. Quote
BIGAL Posted July 8, 2024 Posted July 8, 2024 My $0.05 (defun c:dima ( / ) (command "DIM" "aligned" (getpoint "\nPick pt 1 ")(getpoint "\nPick pt 2 ")(getpoint "\nPick pt 3 ") "" "exit") ) 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.