resullins Posted March 28, 2012 Share Posted March 28, 2012 I have a LISP command, ARRAYINCREMENT.lsp, with an alias of IA. However, I need to assign a keyboard shortcut to it (i.e. CTRL+G) so that I can put it on a certain button of my mouse. However, it doesn't appear in my list of all commands in my CUI, so I'm not sure how to get to it to assign it. Any ideas? I'm really trying to get faster, and the little buttons on my mouse are SO handy for that! Quote Link to comment Share on other sites More sharing options...
Tiger Posted March 28, 2012 Share Posted March 28, 2012 Can't you create a command in the CUI with a macro assigned to it that calls the Lisp? Quote Link to comment Share on other sites More sharing options...
BlackBox Posted March 28, 2012 Share Posted March 28, 2012 I know that newer versions have pretty much locked out use of Ctrl key - One work around for this is to use CUI Editor, Transfer Tab, and drag an existing Shortcut Key (Keyboard Shortcuts, Shortcut Keys node) into a separate CUI(x) file. Set that CUI(x) as Main, and edit as needed. When done, restore original Main CUI(x) and use Transfer Tab to drag to Main CUI(x). Note that you may be overwriting an existing shortcut, depending on your naming convention, command, etc., and that the 'Element ID' (from the original shortcut) will remain. I only have one legacy shortcut key, given that my mouse, keyboard accept (multiple key) Macros, so I just use that instead. There may be a better way to accomplish what I described above. HTH Quote Link to comment Share on other sites More sharing options...
resullins Posted March 28, 2012 Author Share Posted March 28, 2012 Hmmm.... @Tiger: I don't know how to create a custom command in the CUI. @Render: I have unassigned the shortcut keys I don't use. Like CTRL+L... since I never use Ortho, and reassigned them to the commands I want to put on my mouse. Copy, Matchprop, etc. Now, I'm not sure what you're trying to tell me about the custom CUI. I already use a custom CUI... Quote Link to comment Share on other sites More sharing options...
BlackBox Posted March 28, 2012 Share Posted March 28, 2012 Hmmm.... @Tiger: I don't know how to create a custom command in the CUI. Simple - from CUI Editor, bottom left pane, make sure 'Command List' is expanded, then select the 'Create new command' button (the star with asterisk in upper right). @Render: I have unassigned the shortcut keys I don't use. Like CTRL+L... since I never use Ortho, and reassigned them to the commands I want to put on my mouse. Copy, Matchprop, etc. Now, I'm not sure what you're trying to tell me about the custom CUI. I already use a custom CUI... Unassign =/= Assign ... This just disables the existing shortcut, and does not enable your customized version. If a Temporary Override is insufficient, then you have to bring a Shortcut Key into your Main CUI(x) by way of the Transfer Tab, from which you can customize as needed. Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted March 28, 2012 Share Posted March 28, 2012 What I do is: Add lisp to Startup suite Type IA ( in my Autocad "IA" is not used for anythig) and that it. Try it. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted March 28, 2012 Share Posted March 28, 2012 Consider the original post: I have a LISP command, ARRAYINCREMENT.lsp, with an alias of IA. However, I need to assign a keyboard shortcut to it (i.e. CTRL+G) so that I can put it on a certain button of my mouse. However, it doesn't appear in my list of all commands in my CUI, so I'm not sure how to get to it to assign it. Any ideas? I'm really trying to get faster, and the little buttons on my mouse are SO handy for that! What I do is: Add lisp to Startup suite Type IA ( in my Autocad "IA" is not used for anythig) and that it. Try it. Quote Link to comment Share on other sites More sharing options...
mdbdesign Posted March 28, 2012 Share Posted March 28, 2012 Consider the original post: My bad, sorry. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted March 28, 2012 Share Posted March 28, 2012 My bad, sorry. No worries, mate... I do the same thing from time to time. Quote Link to comment Share on other sites More sharing options...
resullins Posted March 28, 2012 Author Share Posted March 28, 2012 Simple - from CUI Editor, bottom left pane, make sure 'Command List' is expanded, then select the 'Create new command' button (the star with asterisk in upper right). Got it! Thanks! Quote Link to comment Share on other sites More sharing options...
resullins Posted March 28, 2012 Author Share Posted March 28, 2012 I've never run into a situation where I actually had to make a command before... I just used it as-is from the Lisp. Quote Link to comment Share on other sites More sharing options...
BlackBox Posted March 29, 2012 Share Posted March 29, 2012 Got it! Thanks! Happy to help. I've never run into a situation where I actually had to make a command before... I just used it as-is from the Lisp. Then... the trick is to demand load your routine, so that it (the code) is only loaded into memory the first time the command is invoked. Otherwise, you end up slowing down drawing open to load a bunch of code that you might not need. Not such a big deal when you're not loading that much, but still. Example macro: ^C^C^P(if (not [color=red]FunctionName[/color])(load "[color=blue]FunctionFile[/color].lsp"));[color=red]FunctionName[/color];^P You can also simply use the Autoload Function if having the button macro is not necessary, and will accomplish the same demand loading. Just have an idea of how you want things to load, and run, and implement the method that suites you. Quote Link to comment Share on other sites More sharing options...
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.