mickydee81 Posted July 17, 2015 Share Posted July 17, 2015 Hi all, I have made a button for saving an xref ^C^C-LAYER;S;0;F;*;;QSAVE; changes layer to 0 and freezes all layers and saves. is there a way that I can run this button from the command line?? Any help would be appreciated Cheers, Have a good one. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted July 17, 2015 Share Posted July 17, 2015 Yes there is. You can create a new command, and incorporate this macro into the definition. Once you have done that you can use ALIASEDIT to define a shortcall for it. Quote Link to comment Share on other sites More sharing options...
mickydee81 Posted July 17, 2015 Author Share Posted July 17, 2015 Hi Dadgad, thanks for the help. Do I create the new command in cui? is this the same as creating a custom button? Cheers Quote Link to comment Share on other sites More sharing options...
Dadgad Posted July 17, 2015 Share Posted July 17, 2015 In the screenshot you can see where you can right click on any named command and a drop down menu will give you the option of NEW COMMAND. Name it, then insert your macro on the right hand side, in the highlighted box. Save it. Then you can use ALIASEDIT to create your shortcall for it. You can also define a toolbar image for it at the top of the right hand dialog, so that if you want to add it to any toolbars you can recognize it. Quote Link to comment Share on other sites More sharing options...
mickydee81 Posted July 17, 2015 Author Share Posted July 17, 2015 Thanks dadgad, got it working. Have a good one Cheers Quote Link to comment Share on other sites More sharing options...
Dadgad Posted July 17, 2015 Share Posted July 17, 2015 May all your problems be so easily overcome, glad I could help you. Quote Link to comment Share on other sites More sharing options...
BIGAL Posted July 18, 2015 Share Posted July 18, 2015 Another way is to add lots of little lisp defuns, you make your own master lisp and use appload to load then make sure you add it to "history" in appload. Ask for others you may want, this example will grow exponentially I have around 30 in my autoload. Almost forgot you can also add predefined commands by copying the code from the CUI. ; save as "mylisps.lsp" etc (defun c:Lofq () (command "-LAYER" "S" "0" "F" "*" "" "" "QSAVE") ) (defun c:ze () (command "Zoom" "E") ) [/code] Quote Link to comment Share on other sites More sharing options...
YZ Posted August 13, 2015 Share Posted August 13, 2015 Yes there is.You can create a new command, and incorporate this macro into the definition. Once you have done that you can use ALIASEDIT to define a shortcall for it. Hey Dagdad, can I quiz you about this? I thought you could not call custom commands from the autocadlt.pgp Alias Edit. I was excited to read your post and so I had another attempt. Still nothing. Maybe it is an LT limitation. For example, could I make a macro that drew a line from 0,0 to 10,0 (L;0,0;10,0;, assign it to LL in my pgp file and expect that macro to run when I type LL[enter]? Can anyone else confirm they can do this? Does anyone know if it is possible or not on LT? Thanks! Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 13, 2015 Share Posted August 13, 2015 I was not aware that it could not be done, seems like you should be able to, as long as you define a NEW COMMAND first. I will give it a try. Quote Link to comment Share on other sites More sharing options...
steven-g Posted August 13, 2015 Share Posted August 13, 2015 I certainly have never had any luck with that, you can create keyboard shortcuts for custom commands, they require the use of the Ctrl, Shift or Alt keys (or combination) Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 13, 2015 Share Posted August 13, 2015 I certainly have never had any luck with that, you can create keyboard shortcuts for custom commands, they require the use of the Ctrl, Shift or Alt keys (or combination) Well, I am certainly inclined to take your word for it steven, in light of your considerable mastery of custom macros, familiarity with, and penchant for LT Magic! I am very happy you showed up, as I have sitting here for some time trying to figure out a way to do it, unaware that you had already joined the thread. You have saved me a lot more time which would have been frittered away trying to do it. Sorry for falsely raising your hopes YZ. Quote Link to comment Share on other sites More sharing options...
YZ Posted August 13, 2015 Share Posted August 13, 2015 Haha, no problem. I'm glad to put it to bed. About 2 months ago I finally created my first keyboard shortcut command using CTRL+1, 2, & Q. And also changed some of the Function keys. It is a really powerful thing. When I saw this I thought perhaps I was just too green to get it working and gave up to easily way back when I first tried. It does seem to me to be a good and easy thing for AutoDesk to implement. It seems the OP got it sorted. Must be an LT restriction. Thanks again guys. Quote Link to comment Share on other sites More sharing options...
steven-g Posted August 13, 2015 Share Posted August 13, 2015 Please don't anybody give up on my account, I would love to find a way to get it to work, maybe I'm just missing something, and having to use two or more keys together is just such a hassel , so I use toolpalettes and toolbars instead. Quote Link to comment Share on other sites More sharing options...
Dadgad Posted August 13, 2015 Share Posted August 13, 2015 (edited) The few of these that I have done, I have always placed as icons on custom toolbars too, I am surprised to find that it either can't be done, or is so difficult to do at the commandline. Edited August 13, 2015 by Dadgad Quote Link to comment Share on other sites More sharing options...
BowHunter77 Posted August 26, 2015 Share Posted August 26, 2015 is there anything that is assumed that should be done here. because i still cannot find my command in the alias editor listing. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 26, 2015 Share Posted August 26, 2015 is there anything that is assumed that should be done here. because i still cannot find my command in the alias editor listing. Alias editor? Are you referring to the acad.pgp file? Quote Link to comment Share on other sites More sharing options...
BowHunter77 Posted August 26, 2015 Share Posted August 26, 2015 i dont know. just following the instructions at the top of the page you go from the CUI to the alias editor. is there something inbeetween that needs to be done to get the command that was made to show up in the alias editor as mentioned above? Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 26, 2015 Share Posted August 26, 2015 Dadgad provided the explanation in post #4. The acad.pgp file, where command aliases are stored, and the CUI are two totally different creatures. Maybe you added your new alias to the wrong part of the file. Quote Link to comment Share on other sites More sharing options...
BowHunter77 Posted August 26, 2015 Share Posted August 26, 2015 I never edited my pgp. His original post says nothing about editing the pgp. Is that what I need to do? It sounds like you are assuming that I already knew to do this. Quote Link to comment Share on other sites More sharing options...
ReMark Posted August 26, 2015 Share Posted August 26, 2015 (edited) Dadgad reference the ALIASEDIT command which is one way to eidt the acad.pgp file. Are you trying to create a new command alias? Yes or no? Another option would be to follow BIGAL's advice in post #7 re: little lisp routines. There are two or three different ways these can be loaded. Edited August 26, 2015 by ReMark 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.