Author Topic: redefining COPY command  (Read 831 times)

0 Members and 1 Guest are viewing this topic.


  • Bull Frog
  • Posts: 320
redefining COPY command
« on: May 09, 2012, 07:53:51 AM »
Hello everyone,
I wrote the following function:

Code: [Select]
(defun undefine-command (cname)
   (if (getcname cname)
        (setvar "cmdecho" 0)
        (command "._UNDEFINE" cname)

(undefine-command "_copy")

(defun copynew ()
  (alert "This is a test")
  (command "_.copy")

(defun c:copia ( )

(defun c:copy ( )

(defun c:_copy ( )

This function works quite well but does not behave exactly like the COPY command in AutoCAD.
In practice, missing the request:
Specify base point or [Displacement / mode] <Spostamento>:

I also tried

Code: [Select]
(command "_.copy" obj"" "_o" "_m")
and other attempts but I can never simulate the exact behavior of the original COPY command.  :cry:
Do you have any idea?

Thanks in advance


  • Global Moderator
  • Seagull
  • Posts: 10390
Re: redefining COPY command
« Reply #1 on: May 09, 2012, 09:16:19 AM »
What do you get with this?
(command "_.copy" obj "" pause)
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.