View Full Version : Looking for a lisp
JOHN.73561
2005-06-09, 08:53 PM
Anyone have a lisp routine that would draw a rectangle with two lines that go
corner to corner for blocking. So you could pick two points and have blocking any size.
Something like this?
(defun c:blkX (/ pt1 pt2 pt3 pt4)
(and (setq osmode (getvar "osmode"))
(setvar "osmode" 0)
(setq pt1 (getpoint "\nFirst corner for blocking: "))
(setq pt3 (getcorner pt1 "\n.....other corner: "))
(setq pt2 (list (car pt1) (cadr pt3)))
(setq pt4 (list (car pt3) (cadr pt1)))
(not (command ".pline" pt1 pt2 pt3 pt4 "cl"))
(not (command ".line" pt1 pt3 ""))
(not (command ".line" pt2 pt4 ""))
)
(setvar "osmode" osmode)
(princ)
)
JOHN.73561
2005-06-10, 01:50 PM
Perfect! Thats exactly what I wanted.
Thank you :)
vBulletin® v3.6.7, Copyright ©2000-2010, Jelsoft Enterprises Ltd.