Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted
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

Posted

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.

Posted
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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...