; do offset 1st then (if (not getcoords)(load "pline co-ords")); do offset here(setq obj (entlast)) ; return last offset line(co-ords2xy) ; seperate routine that retrieves the pline points as a list of points ((x1 y1)(x2 y2)(princ co-ordsxy); this should return co-ordsxy(entdel obj) ; del offset pline(setq x -1) ; so x starts at nth 0 at start and closing(command "PLINE" (while (= (getvar "cmdactive") 1) (COMMAND (repeat (length co-ordsxy) (nth (setq x (+ x 1)) co-ordsxy) ) ) ) )(command "C")
; 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" ) ) ))(defun co-ords2xy (); 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(setq len (length co-ords))(setq numb (/ len 2)) ; even and odd check required(setq I 0)(repeat numb(setq xy (list (nth i co-ords)(nth (+ I 1) co-ords) )); odd (setq xy (list (nth i co-ords)(nth (+ I 1) co-ords)(nth (+ I 2) co-ords) ))(setq co-ordsxy (cons xy co-ordsxy))(setq I (+ I 2)))); program starts here(setq co-ords (getcoords (car (entsel "\nplease pick pline"))))(co-ords2xy) ; list of 2d points making pline
Thanks Al!,
Ill try to digest that,
I was crossing my fingers that I was already on the right track and there was something simple missing from my code with regards to xclip boundaries.