Since the copy step is constant, why don't use the ARRAY command instead?
Registered forum members do not see this ad.
Hi Guys,
You know how on the copy command you can select a general direction and keep copying relative to the base point? Well, I'd like to do that but would like the copy distance to be relative to the last copy point.
In case it's not clear I'll offer an example:
Create a circle at points 0,0,0.
I would like to copy the circle every 10 ft. along the x axis for 100 ft. Instead of continually entering copy points of 10,20,30,40,50 etc. from the base point of 0,0,0 I would like to start at 0,0,0 but enter [copy] and for distances enter 10,10,10,10 and have each copied circle advance from the last copy's point 10 feet or whatever distance I need.
In real life these points for me would vary so it wouldn't be a constant 10 ft., or an even length, it would vary.
It seems like a simple LISP routine could handle this but I would like to know if this function exists within autocad before I reinvent the toaster oven...
thanks in advance!
Since the copy step is constant, why don't use the ARRAY command instead?
Regards,
Mircea
AutoCAD's happy user equation: FILEDIA + PICKADD² + PICKFIRST = 3

Toaster OVEN? I think you have just invented it...
I would use temporary tracking points, but that could be a lot of clicking.
Rob
Never heard of a toaster oven (not a toaster)? I'm starting to feel old now and I'm just in my mid 30's...
Sounds like there's nothing native in cad for this command so I'll just draft up a lisp - should be pretty straight forward.
Thanks,
Here is a relatively simple program:
Or, if you have Express Tools installed:Code:(defun c:copyrel ( / b i l p q s ) (if (and (setq s (ssget "_:L")) (setq p (getpoint "\nSpecify Base Point: ")) (setq b (vlax-3D-point (trans p 1 0))) ) (progn (repeat (setq i (sslength s)) (setq l (cons (vlax-ename->vla-object (ssname s (setq i (1- i)))) l)) ) (while (setq q (getpoint "\nSpecify Second Point: " p)) (foreach x l (vla-move (vla-copy x) b (vlax-3D-point (trans q 1 0)))) (setq p q) ) ) ) (princ) ) (vl-load-com) (princ)
Code:(defun c:copyrel ( / b i l o p q s ) (if (and (setq s (ssget "_:L")) (setq p (getpoint "\nSpecify Base Point: ")) (setq b (vlax-3D-point (trans p 1 0))) ) (progn (repeat (setq i (sslength s)) (setq l (cons (vlax-ename->vla-object (ssname s (setq i (1- i)))) l)) ) (while (setq q (acet-ss-drag-move s p "\nSpecify Second Point: " 0 0)) (setq s (ssadd)) (foreach x l (vla-move (setq o (vla-copy x)) b (vlax-3D-point (trans q 1 0))) (ssadd (vlax-vla-object->ename o) s) ) (setq p q) ) ) ) (princ) ) (vl-load-com) (princ)
Lee Mac Programming
With Mathematics there is the possibility of perfect rigour, so why settle for less?
Just another Swamper
Lee Mac, now you've gone and done it... I've been attempting new things lately and have come across older posts where you most generously offer assistance to others and now you've gone and done it to me!
God Bless you,
Registered forum members do not see this ad.
Nice, Lee... I also use acet-ss-drag-move and acet-ss-drag-rotate for my CopyRotate (CORO) Command.![]()
"Potential has a shelf life." - Margaret Atwood
Bookmarks