prathimaholla Posted December 16, 2008 Posted December 16, 2008 Hi I am ajith .I need a lisp program to find end points of autocad drawing and display its dimention with reference to x or y plane Quote
Raggi_Thor Posted December 16, 2008 Posted December 16, 2008 Start playing with (getvar "extmin"). You would probably guess on "extmax" also. This will give you a list of x,y,z for the min an max of the drawing's extents. Quote
prathimaholla Posted December 16, 2008 Author Posted December 16, 2008 Start playing with (getvar "extmin").You would probably guess on "extmax" also. This will give you a list of x,y,z for the min an max of the drawing's extents. Can you send code to find all end points of a drawing Quote
Lee Mac Posted December 16, 2008 Posted December 16, 2008 Try this: (defun c:dwgdim (/ bt tp) (setq bt (getvar "extmin") tp (getvar "extmax") ) ;_ end setq (alert (strcat "Drawing Dimensions are: \n" (rtos (- (car tp) (car bt)) 2 2) " x " (rtos (- (cadr tp) (cadr bt)) 2 2) ) ;_ end strcat ) ;_ end alert (princ) ) ;_ end defun But it probably would have benefitted you more to experiment with the variables yourself. Quote
Lee Mac Posted December 16, 2008 Posted December 16, 2008 I agree, but you where kind Cheers Raggi, I must say, you pretty much spelled out how to create the code, but as he stubbornly still requested the code to be posted, I thought I'd experiment, as I too had never used the extmin and extmax variables - pretty useful it turns out. 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.