cwize Posted April 30, 2013 Posted April 30, 2013 I have a .lsp file that mostly creates keyboard shortcuts for basic commands. My copy mode is set to default to "multiple" - and if I type "copy", it is indeed multiple. However, if I use my shortcut (just the "c" key), it is not. Here's the code: (defun c:c() (command "copy")) I don't think it gets much simpler than that... why would it not operate the same way as "copy"? Confused. Quote
cwize Posted April 30, 2013 Author Posted April 30, 2013 I forgot to mention, I'm using AutoCad 2010. Quote
Lee Mac Posted April 30, 2013 Posted April 30, 2013 You can use the initcommandversion function to force the later version of the command: (defun c:c ( ) (initcommandversion) (command "_.copy") ) However, why not just change the alias for the copy command in the acad.pgp file? [Tools > Customise > Edit Program Parameters (acad.pgp)] Quote
alanjt Posted April 30, 2013 Posted April 30, 2013 I'm with Lee. Make these type of changes at the acad.pgp level. Much less headache. Also, to make things easier and more organized, instead of editing what's already there, just place everything you want after the follow bit of text, placed at the bottom of all acad.pgp files. ; -- User Defined Command Aliases -- ; Make any changes or additions to the default AutoCAD command aliases in ; this section to ensure successful migration of these settings when you ; upgrade to the next version of AutoCAD. If a command alias appears more ; than once in this file, items in the User Defined Command Alias take ; precedence over duplicates that appear earlier in the file. ; **********----------********** ; No xlate ; DO NOT REMOVE Quote
cwize Posted April 30, 2013 Author Posted April 30, 2013 Thanks to both of you for the answers - I'd not heard of "initcommandversion". The command was part of of a long Lisp routine that shortened a ton of commands and was created by a coworker many years ago. It's how I learned AutoCad, so the familiarity is why I haven't gone into the .pgp stuff (I did, somewhat, when I was stuck with LT for a while). Also, big thanks for this text block to avoid editing the default pgp. Quote
Lee Mac Posted April 30, 2013 Posted April 30, 2013 You're very welcome cwize For completeness, here is the documentation for the initcommandversion function. Quote
Recommended Posts
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.