Have a look at the cadtutor post by me. It uses the lot number to find all lots automatically. I doubt the code will be as complicated as already posted. I am busy at moment and this is a bigger task. I will try to do something.
1 Pick lot by text use Bpoly make a boundary
2 Offset boundary
3 Use copy with "F" option to pick all plines & lines
4 move it away from the original using a grid pattern for to be repeated for all lots
5 trim using a offset from the original created BPOLY pline offset again and use the "F" option with trim
6 erase the dummy plines
7 work out the centroid of the shape
8 go to layout add new using layout title block
9 mspace then zoom c scalefactor you should see your lot
10 back to pspace add the corner points in a table
here is a start ver 1
Ver 2 draws extra plines keep watching
Caution not tested properly
; pline co-ords example
; By Alan H
(defun getcoords (ent)
(vlax-safearray->list
(vlax-variant-value
(vlax-get-property
(vlax-ename->vla-object ent)
"Coordinates"
)
)
)
)
; convert now to a list of xy as co-ords are x y x y x y if 3d x y z x y z
(defun co-ords2xy (co-ords / xy I )
(setq co-ordsxy '())
(setq numb (/ (length co-ords) 2))
(setq I 0)
(repeat numb
(setq xy (list (nth I co-ords)(nth (+ I 1) co-ords) ))
(setq co-ordsxy (cons xy co-ordsxy))
(setq I (+ I 2))
)
)
; program starts here a test all corner points of the internal lots
(defun c:dolots2 ( / ss lay pt obj obj2 obj3 txt txtstr txtins x y co-ords2 co-ords3 co-ords4)
(setq off (getdist "Please enter suitable offset for lines"))
(setq off2 (getdist "Please enter spacing of lots eg 2x size"))
(setq pt ( getpoint "Select a point in space for lots"))
(setq obj (vlax-ename->vla-object (car (entsel "\nPick text"))))
(setq lay (vla-get-layer obj))
(setq ss (ssget "X" (list (cons 0 "*text")(cons 8 lay))))
(repeat
(setq x (sslength ss))
(setq txt (vlax-ename->vla-object (ssname ss (setq x (- x 1)))))
(setq txtstr (vla-get-textstring txt))
(setq txtins (vlax-safearray->list (vlax-variant-value (vla-get-insertionpoint txt))))
(setq txtins (list (- (car txtins) 0.05)(- (cadr txtins) 0.05)))
(command "bpoly" txtins "")
(setq obj2 (entlast))
(co-ords2xy (getcoords obj2))
(setq co-ords co-ordsxy)
;(setq co-ordsxy nil)
(command "offset" off obj2 (list 0 0) "")
(setq obj3 (entlast))
(co-ords2xy (getcoords obj3))
(setq co-ords2 co-ordsxy)
;(setq co-ordsxy nil)
(command "offset" off obj3 (list 0 0) "")
(setq obj4 (entlast))
(co-ords2xy (getcoords obj4))
(setq co-ords3 co-ordsxy)
;(setq co-ordsxy nil)
(command "move" obj2 obj3 obj4 "" txtins pt )
(command "zoom" "e" "zoom" "0.5XP")
(command "copy" "CP")
(while (= (getvar "cmdactive") 1 )
(foreach xy co-ords3 (command xy) )
(command "" "" txtins pt)
)
;(command txtins pt )
(co-ords2xy (getcoords obj4))
(setq co-ords3 co-ordsxy)
(command "erase" obj4 "")
(command "trim" obj3 "" "F")
(while (= (getvar "cmdactive") 1 )
(repeat (setq y (length co-ords3))
(command (nth (setq y (- y 1)) co-ords3))
)
(command (nth (- (length co-ords3) 1) co-ords3))
(command "" "")
)
(command "erase" obj2 obj3 "")
(setq pt (list (+ (car pt) off2) (cadr pt)))
)
)