Author Topic: redefining COPY command  (Read 1427 times)

0 Members and 1 Guest are viewing this topic.

Lupo76

  • Bull Frog
  • Posts: 343
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)
     (progn
        (setvar "cmdecho" 0)
        (command "._UNDEFINE" cname)
     )
   )
)


(undefine-command "_copy")

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


(defun c:copia ( )
  (copynew)
)

(defun c:copy ( )
   (copynew)
)

(defun c:_copy ( )
   (copynew)
)

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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
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.