BowHunter77 Posted August 26, 2015 Share Posted August 26, 2015 Ok. I am just trying to be able to type a command into the command prompt that I created a script for in the CUI, and have it run like a normal command. Can I or can I not do that? If so, how? Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 26, 2015 Share Posted August 26, 2015 You would have to create a command alias by adding it to your acad.pgp file via the ALIASEDIT command, or clicking on the Manage tab of the Ribbon and then selecting the Edit Aliases from the Customization panel or manually (old school) editing the acad.pgp. If AutoCAD is running and you use the last method you would have to issue the REINIT command and make sure to place a checkmark in the box for PGP file. Quote Link to comment Share on other sites More sharing options...
YZ Posted August 27, 2015 Share Posted August 27, 2015 Between Dagdad, steven-g and I we could not find a way to create a custom command that you can type into command line. You can edit a command line version of a core AutoCAD OOTB command. But it does not seem that you can assign a new command line string that will call a new script from cui. Even if you change, say, LINE in CUI to a different macro string, typing LINE (or L) in the command line will still call the OOTB LINE command. However, the one thing you can do is assign keyboard shortcuts. Maybe that is your best way around it BowHunter. For example, you can set your new scripts to CTRL+1, CTRL+2, etc. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 27, 2015 Share Posted August 27, 2015 YZ to UNDEFINE or REDEFINE a command do just that, L is now lol. Me personally I stay away from the default commands and use simpler methods like zzz xxx for custom commands. Quote Link to comment Share on other sites More sharing options...
YZ Posted August 27, 2015 Share Posted August 27, 2015 I did not know about UNDEFINE or REDEFINE. Looks like LT does not have it. Sounds perfect though. I use keyboard shortcuts. If I could assign zzz to a custom command I would for sure, that's a great idea. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 27, 2015 Share Posted August 27, 2015 I did edit the post to say may not work with LT accidentally closed. http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/override-existing-autocad-commands/td-p/3376843 Quote Link to comment Share on other sites More sharing options...
mickydee81 Posted August 27, 2015 Author Share Posted August 27, 2015 Hi all, just to be clear. Someone has written a lisp routine in my offices called basesave which achieves the same thing as the macro in the original post. I never had any luck adding an alias to the button and running it from the command line. Cheers Quote Link to comment Share on other sites More sharing options...
steven-g Posted August 27, 2015 Share Posted August 27, 2015 Undefine etc. are not recognized in LT, and looking at your link Bigal they appear to be run by a startup LISP in full autocad, LT can run startup scripts, but no LISP. I still have found no other method other than the shortcut key combination with Ctrl, Shift or Alt, for custom commands (for keyboard control). Quote Link to comment Share on other sites More sharing options...
BIGAL Posted August 28, 2015 Share Posted August 28, 2015 Thanks steven-g mickydee81 just add this to your acaddoc.lsp ; I dont know the command to run or do you just load it (defun c:BSL () (load "basesave")(command "somethingorother")) 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.