Author Topic: Multiple copy command  (Read 4584 times)

0 Members and 1 Guest are viewing this topic.

TJAM51

  • Guest
Multiple copy command
« on: September 15, 2004, 07:57:56 AM »
I know that the following toolbar command will do multiple copies but how would you do it in lisp



copy;\;m;;

SMadsen

  • Guest
Multiple copy command
« Reply #1 on: September 15, 2004, 08:19:28 AM »
(command "COPY" pause "" "M" pause)

If it's part of a multiple task routine, you might want to include a loop like
(while (> (getvar "CMDACTIVE") 0)
  (command pause)) .. or something like that.

Beware that the multiple option has been changed with 2005, so that multiple copying is now the default.

M-dub

  • Guest
Multiple copy command
« Reply #2 on: September 15, 2004, 08:22:59 AM »
Quote from: SMadsen
Beware that the multiple option has been changed with 2005, so that multiple copying is now the default.


FINALLY!!!  :)  :twisted:

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Multiple copy command
« Reply #3 on: September 15, 2004, 08:24:19 AM »
well an old trick is:
Code: [Select]

(command "copy" pause ""  "m")
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

SMadsen

  • Guest
Multiple copy command
« Reply #4 on: September 15, 2004, 08:26:49 AM »
Quote from: Keith
well an old trick is:
Code: [Select]

(command "copy" pause ""  "m")

Right, the last pause in my post is redundant (unless some needy code follows)

TJAM51

  • Guest
Multiple copy command
« Reply #5 on: September 15, 2004, 08:30:56 AM »
I tried this


(DEFUN C:cm ()
(command "COPY" pause "" "M" pause)


and received this

Command: cm
copy
Select objects: 1 found

Select objects: mulitple

*Invalid selection*
Expects a point or
Window/Last/Crossing/BOX/ALL/Fence/WPolygon/CPolygon/Group/Add/Remove/Multiple/P
revious/Undo/AUto/SIngle
; error: Function cancelled

Select objects:
Specify base point or displacement, or [Multiple]: *Cancel*

TJAM51

  • Guest
Multiple copy command
« Reply #6 on: September 15, 2004, 08:37:38 AM »
I also tried this

(command "copy" pause ""  "m")


and received this

Command: cm
copy
Select objects: 1 found

Select objects: mulitple

*Invalid selection*
Expects a point or

SMadsen

  • Guest
Multiple copy command
« Reply #7 on: September 15, 2004, 08:49:43 AM »
TJ, where does the "mulitple" come from? (and what language is it? :) )

TJAM51

  • Guest
Multiple copy command
« Reply #8 on: September 15, 2004, 08:52:50 AM »
I am using 2001. I am wanting to use the multiple command so the multiple is a user input.......russian maybe

SMadsen

  • Guest
Multiple copy command
« Reply #9 on: September 15, 2004, 08:56:24 AM »
Nah, that would be mulitsje  :)

Try this
Code: [Select]
(defun C:CM ()
  (cond ((setq ss (ssget))
         (command "_COPY" ss "" "Multiple")
         (princ)
        )
  )
)

TJAM51

  • Guest
Multiple copy command
« Reply #10 on: September 15, 2004, 09:01:35 AM »
In the voice of Elvis Presley


thank you very much

SMadsen

  • Guest
Multiple copy command
« Reply #11 on: September 15, 2004, 09:07:05 AM »
:dood: