Consider the Offset, and the Trim & Pedit, or the Pedit Commands.

Registered forum members do not see this ad.
Need lisp for create rectangle (red colour) between rectangle (black colour)
Consider the Offset, and the Trim & Pedit, or the Pedit Commands.
"Potential has a shelf life." - Margaret Atwood




Another way with lisp pick two diag corners xoff yoff can be different draws new rectang. 3pt answer if rectang on angle.
I would go 3pt you can bet if you make it square only you need an angle version.
A man who never made mistakes never made anything


Git_thailand, please re-read all off topic that you have posted. Please give more detail for what you want.
Oh yeah.... but it could also be four depending on how you see it. 5 even if you include the middle one as a separate entity.
Oh well....
HTHCode:(defun c:BeatBox (/ _HiLow _Box _trans rec pts low high) (defun _HiLow (lev lst) (list (apply lev (mapcar 'car lst)) (apply lev (mapcar 'cadr lst)) ) ) (defun _Box (p1 p2) (command "_rectang" "_non" p1 "_non" p2) ) (setq _trans (lambda (pt) (trans pt 0 1))) (if (and (setq dist (cond ( (getdist (strcat "\nOffset Distance" (if dist (strcat " <" (rtos dist) ">: ") ": ") ) ) ) ( dist ) ) ) (setq rec (ssget '((0 . "LWPOLYLINE") (-4 . "&=") (70 . 1)) ) )) (progn (repeat (setq i (sslength rec)) (setq pts (mapcar 'cdr (vl-remove-if-not '(lambda (j) (= (car j) 10) ) (entget (setq e (ssname rec (setq i (1- i))))) ) ) pts (mapcar '_trans pts) ) (setq Low (_HiLow 'min pts) High (_HiLow 'max pts) ) (_Box (list (car low) (+ (cadr low) dist)) (list (car high) (- (cadr high) dist)) ) (_Box (list (+ (car low) dist) (cadr low)) (list (- (car high) dist) (cadr high)) ) ) ) ) )
UPDATED:
Last edited by pBe; 20th Apr 2012 at 01:51 pm. Reason: Updated for Multiple objects

create rectangle between two rectangle
before.jpgafter.jpg
You really need a lisp routine to do this? Really??
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge!
Registered forum members do not see this ad.
Geez. I was right the first time. It is indeed 4.create rectangle between two rectangle
But then again...
I am wondering myself.You really need a lisp routine to do this? Really??
Bookmarks