Hi,
What do I normally do is define the functions with full name in a compiled files and create another file, with a short description to the function and shortcut command, which can be edited by the user. For example:
Code:
;MainFunctions.LSP
(defun c:EditAttributes (/ var1 var2)
....
) ;end defun
(defun c:ExtractAttributes (/ )
...
) ; end defun
Code:
;ShortCmds.lsp
; The following command is used for global attribute edit.
(defun C:EAD ()(c:EditAttributes))
;The following command extracts all the attributes in the drawing to a text file.
(defun C:AXT ()(c:ExtractAttributes))
This will prevent the users from tampering the original code, while giving them the flexibility to edit the keyboard shortcuts according to their preference. When I call these commands from a menu, I use
Code:
[Extract Attributes]^p^c^c(if (not c:ExtractAttributes)(load "MainFunction.lsp"));ExtractAttributes
so that I can make sure that the original function is called irrespective of the short command names in individual computers.
Note: If the function is not loaded, include the code to load the file when the short command is called.
Regards,
AH