pmadhwal7 Posted February 13, 2020 Share Posted February 13, 2020 Hi to all is their any lsp which will place dimension on its length and width and also place area of rectangle for more see the attachment recangle.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 15, 2020 Share Posted February 15, 2020 Here is a start I will let you add the area use (entlast) of the rectang and you can get the property Area and add. ; simple draw a box and dimension it ; By Alan H March 2019 ' info@alanh.com.au (defun ah:box ( / pt1 pt2 pt3 ahl ahh ahoff ) (setq oldsnap (getvar 'osmode)) (setq oldang (getvar 'angdir)) (setq pt1 (getpoint "\nPick lower left")) (setvar 'osmode 0) (if (not AH:getvalsm)(load "Multi Getvals.lsp")) (setq ans (AH:getvalsm (list "Simple rectang" "Enter length" 8 7 "1" "Enter height " 8 7 "2"))) (setq ahL (atof (nth 0 ans))) (setq ahH (atof (nth 1 ans))) (setq pt2 (polar pt1 0.0 ahl)) (setq pt3 (polar pt2 (/ pi 2.0) ahH)) (command "rectang" pt1 pt3) (setq ahoff (* 2.0 (* (getvar 'dimasz)(getvar 'dimscale)))) ; change offset as required (setq pt4 (polar pt2 (* pi 1.5) ahoff)) (command "dim" "hor" pt1 pt2 pt4 "" "exit") (setq pt4 (polar pt3 0.0 ahoff)) (command "dim" "Ver" pt2 pt3 pt4 "" "exit") (setvar 'osmode oldsnap) ) (ah:box) Multi GETVALS.lsp Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted February 17, 2020 Author Share Posted February 17, 2020 On 2/15/2020 at 2:47 PM, BIGAL said: Here is a start I will let you add the area use (entlast) of the rectang and you can get the property Area and add. ; simple draw a box and dimension it ; By Alan H March 2019 ' info@alanh.com.au (defun ah:box ( / pt1 pt2 pt3 ahl ahh ahoff ) (setq oldsnap (getvar 'osmode)) (setq oldang (getvar 'angdir)) (setq pt1 (getpoint "\nPick lower left")) (setvar 'osmode 0) (if (not AH:getvalsm)(load "Multi Getvals.lsp")) (setq ans (AH:getvalsm (list "Simple rectang" "Enter length" 8 7 "1" "Enter height " 8 7 "2"))) (setq ahL (atof (nth 0 ans))) (setq ahH (atof (nth 1 ans))) (setq pt2 (polar pt1 0.0 ahl)) (setq pt3 (polar pt2 (/ pi 2.0) ahH)) (command "rectang" pt1 pt3) (setq ahoff (* 2.0 (* (getvar 'dimasz)(getvar 'dimscale)))) ; change offset as required (setq pt4 (polar pt2 (* pi 1.5) ahoff)) (command "dim" "hor" pt1 pt2 pt4 "" "exit") (setq pt4 (polar pt3 0.0 ahoff)) (command "dim" "Ver" pt2 pt3 pt4 "" "exit") (setvar 'osmode oldsnap) ) (ah:box) Multi GETVALS.lsp 2.07 kB · 4 downloads HOW TO USE MULTI GETVALS??? Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 17, 2020 Share Posted February 17, 2020 (edited) Save the box.lsp and multi getvals to a location in your support paths, somewhere where you save your free stuff. The multi getvals is a Library routine that creates DCL on the fly rather than line by line questions, in this case its called by this line. There are examples in the code if you look, you can change default values the "1" & "2" (setq ans (AH:getvalsm (list "Simple rectang" "Enter length" 8 7 "1" "Enter height " 8 7 "2"))) Edited February 17, 2020 by BIGAL Quote Link to comment Share on other sites More sharing options...
pmadhwal7 Posted February 17, 2020 Author Share Posted February 17, 2020 (edited) 1 hour ago, BIGAL said: Save the box.lsp and multi getvals to a location in your support paths, somewhere where you save your free stuff. The multi getvals is a Library routine that creates DCL on the fly rather than line by line questions, in this case its called by this line. There are examples in the code if you look, you can change default values the "1" & "2" (setq ans (AH:getvalsm (list "Simple rectang" "Enter length" 8 7 "1" "Enter height " 8 7 "2"))) this the perfect lsp from lee mac just one thing not their that Area text is it possible to place Area text before total value. http://www.lee-mac.com/areastofield.html Edited February 17, 2020 by pmadhwal7 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.