Jump to content

_undefine and _redefine command by lisp only on one drwawing


MastroLube

Recommended Posts

Hello guys, I've got a little problem!

 

I need to redefine the _copy and the _delete command in order to add some instruction to them.

 

2 problems:

 

1. I'm italian, the locate command for copy is "copia" and for delete "cancella"

I have to redefine all of them? What if someone has the german version of autocad?

 

exemple:

(defun C:copia (/ i selected )
 (IF (dcl-Form-IsActive Cobiax/Main)
   (progn
     
   (princ "\n Selezionare gli alleggerimenti da copiare: ")
   (setq selected (ssget))
   (command "_.copy" selected "" pause pause)
 
 
 (conta_elementi nome)
   )
   (progn
   (redef "copia")
   (redef "_copy")
   (command "_.copy")
   )
   )
 
;(princ)
)

[ it possible to defun multiple commands at once?

(defun C:copy;copia;Kopie; ...) ]

 

2. Is it possible to have the redefined command only on the current drawing ?

Otherwise the lisp will fail on other drawings...

 

Thanks guys :)

 

Dennis

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...