Copy quantity of text

Copy quantity of text

pallen9JA6T
Enthusiast Enthusiast
874 Views
2 Replies
Message 1 of 3

Copy quantity of text

pallen9JA6T
Enthusiast
Enthusiast

Is there a lisp that will copy selected objects and instead of entering a quantity, you would click a text object that specifies the quantity? I want it to paste them in a single row (somewhat like an array with one row and a specified quantity of columns). I've posted a picture of an example. I'm not concerned if the copied objects overlap or not. I would prefer that they are all 2 " apart, but that not critical. I just need them to copy a specified number of times, but I'd like to click a text object to specify the number of copies. Thanks in advance!

 

example.jpg

0 Likes
Accepted solutions (1)
875 Views
2 Replies
Replies (2)
Message 2 of 3

ВeekeeCZ
Consultant
Consultant
Accepted solution
(defun c:CopyArrayPick ( / s n)
  
  (and (setq s (ssget "_:L"))
       (setq n (car (entsel "\nSelect number: ")))
       (setq n (atoi (cdr (assoc 1 (entget n)))))
       (or (not (zerop n)) (alert "Not a number. Or Mtext formatted."))
       (initcommandversion)
       (command "_.copy" s "" "_non" '(0 0) "_A" n "_non" '(0 0.0508) "")
       )
  (princ)
  )
0 Likes
Message 3 of 3

pallen9JA6T
Enthusiast
Enthusiast

Works perfect! Thanks so much!

0 Likes