Duplicate object instantly

Duplicate object instantly

kibitotato
Advocate Advocate
480 Views
3 Replies
Message 1 of 4

Duplicate object instantly

kibitotato
Advocate
Advocate

trying to do my first lisp

simple thing

select an objet copy and paste into the same place with spanish commands

 

(defun c:cv ()
(setq ss (ssget))
(command "COPIARBASE" ss "" "0,0,0" ss "PEGAPP" ss "0,0,0")
)

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

ВeekeeCZ
Consultant
Consultant
Accepted solution

 

(defun c:cv ()
  (setq ss (ssget))
  (command "COPIARBASE" "0,0,0" ss "" "PEGAPP" "0,0,0")
)

 

 

COPY - basepoint - selectionset - close the selection - PASTE - basepoint.

 

BTW much slower than using the COPY command.

0 Likes
Message 3 of 4

kibitotato
Advocate
Advocate

It works!!! Nices job. I really love this forum. Thanks BeekeeCZ

0 Likes
Message 4 of 4

Kent1Cooper
Consultant
Consultant

Why bother with the clipboard?  Just use a COPY command [whatever that's called in Spanish, or use the universalized _English-command-name], with the same place for the base and displacement points:

 

(defun c:cv (/ ss)
  (if (setq ss (ssget))
    (command "_.copy" ss "" "0,0,0" "0,0,0")

  )
)

Kent Cooper, AIA
0 Likes