Jump to content

Continuous Copy.lsp


Chasedzn

Recommended Posts

I have an old lsp that doesn't seem to work. I wonder if anyone can help. The LSP is designed to copy an object multiple times- like array but more flexible.

 

Continuous Copy.lsp

Link to comment
Share on other sites

I thought I posted here yesterday. 

 

Was this the old Continuous Copy from SoftDesk? Sounds like it.

 

When we switched to 2000i and dropped AutoCAD 14 with SoftDesk, pretty sure I never missed it, though it was handy, maybe I have something.

 

I found this old thread Continuous Copy - Autodesk Community - AutoCAD.

 

Maybe this by Kent Cooper can be of use

 

Claims to be a remake of the SoftDesk Continuous Copy... 

 

This is a good thread with some solutions...Solved: Re: Quick copy with spacing - LISP - Autodesk Community - AutoCAD

Link to comment
Share on other sites

I got interested in coming back to this topic.

 

I have confirmed the ZZ functions are from Softdesk (LDD for a while) which was bought by Autodesk (prompting a lawsuit).

 

Found a few more codes to replace the Continuous Copy from Softdesk (also LDD for a while).

 

Both codes posted here I tested and they work...My favorite CC lisp not working (augi.com) I should have known Alan JT would have one.

 

Also some work by Alan JT, LeeMAC, marko_ribar here among others)...Accumulative copy lisp - AutoLISP, Visual LISP & DCL - AutoCAD Forums (cadtutor.net)

 

 

Link to comment
Share on other sites

I had this, I have cleaned up, IIRC it works pretty similar if not exactly like the old Softdesk Continuous Copy.

 

;;; Allows you to copy objects multiple times at a typed in distance and angle.             |
;;;                                                                                         |
;;; |ContCop.lsp| similar to SoftEngine command Continuous Copy                             |
;;;                                                                                         |
;;; https://www.cadtutor.net/forum/topic/89869-continuous-copylsp/#comment-648783           |
;;;                                                                                         |
;;; By SLW210 (Steve Wilson)                                                                |
;;;                                                                                         |
;;;_________________________________________________________________________________________|
;;;                                                                                         |
;;; August 18th, 2024                                                                       |
;;;                                                                                         |
;;;                                                                                         |
;;;                                                                                         |
;;;                                                                                         |
;;;_________________________________________________________________________________________|
;;;                                                                                         |
;;;                                                                                         |

(defun C:ContCop (/ ss ang dist dists temp pt1 pt2 oldOsnap)
  ;; Error handler for internal errors
  (defun ccerr (st)
    (if	(or (/= st "Function cancelled") (= st "quit / exit abort"))
      (princ (strcat "\nError: " st))
    )
    (princ)
  )

  ;; Set the error handler
  (setq *error* 'ccerr)

  ;; Store current Osnap setting
  (setq oldOsnap (getvar "OSMODE"))

  ;; Prompt user to select objects
  (prompt "\nSelect objects to copy: ")
  (command "select" "auto" pause)
  (setq ss (ssget "p"))

  ;; Prompt user to select the start and end points
  (initget 1)
  (setq pt1 (getpoint "\nSelect Start Point: "))
  (initget 1)
  (setq pt2 (getpoint pt1 "\nSelect End Point: "))

  ;; Calculate distance and angle
  (setq	dist  (distance pt1 pt2)
	ang   (angtos (angle pt1 pt2) 0 6)
	dists 0.0
  )

  ;; Main loop for continuous copying
  (while
    (/=	(setq
	  temp (getdist
		 (strcat "\nNext distance/Exit < " (rtos dist) " >: ")
	       )
	)
	"Exit"
    )
     (setq dists (+ dists
		    (if	(not temp)
		      dist
		      temp
		    )
		 )
     )
     (setq temp (strcat "@" (rtos dists 2 6) "<" ang))
     (command "COPY" ss "" "0,0" temp)
  )

  ;; Restore original Osnap setting
  (setvar "OSMODE" oldOsnap)

  (princ)
)

 

I am positive the others are better, but I need the practice, hopefully commented correctly for you and me both.

 

 

  • Like 2
Link to comment
Share on other sites

I worked for a conveyor company back then, used this a lot.

 

Alan JT's are nice, hoping mine will work in the latest AutoCAD LT.

 

I was hoping some of the old timers that moved from LDD or Softdesk AutoCAD would pop in. Not many of us left!

 

Losing Softdesk probably instigated a lot of LISP back then, AutoCAD 2000i actually has some of the functionality, though not all.

 

It was almost like we forgot how to use AutoCAD for a while when we switched, I am surprised this particular was never added to AutoCAD.

 

I wonder what happened to all of the ZZ functions?

 

Cadalyst was the game for CAD and LISP back then, I should search there.

 

Most probably created Array and/or Copy macros on a toolbar as well.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...