Show full version of the posting: Macro
I am new to AutoCAD LT. I have run full AutoCadd since version 1.1. Yes thats how old I am. Here is my question, I have a couple of very easy two command lisp's that i am lost with out that I cannot use in LT because you cannot use LISP files. Below are the LISP's. How do I put these into LT, macro, etc. ;;; zooms window(defun c:w()(command "zoom" "w");;; zooms all(defun c:za ()(command "zoom" "a");;; zooms previous(defun c:zx()(command "zoom" "p")If anyone can help I would greatly appreciate it. The problem with growing old and being set in your ways.Thank you,
Create macros. One way to do it would be to write your own. The other way to do it would be to use AutoCAD's action recorder feature. Record the steps you normally would take and when done save the macro for future playback. I've done this for a macro that will run a -purge on a drawing, then an audit followed by a zoom > extents and finally a save.By the way, if you create your own macro you could assign it to a button and place it on a toolbar. Click on the button and the macro is invoked.Another option might be to assign the commands to your mouse buttons.
John Connor2015-02-17 13:15:13
In the case of Zoom Window, you don't need to program anything for that. The Zoom command operates in Window mode by default if you don't specify something else.
Macros for the other examples would be dead simple, and would contain something as basic as:
Note that often macros that you'll see around start with ^C^C, which is a double Cancel, to get you out of any command you might be in when you pick the menu item that contains the macro. But in the case of something like Zoom [and certain other commands], which can be used transparently, you don't want to do that. As written above with the apostrophe prefix, you can use them in the middle of some other command, provided the resulting Zoom doesn't trigger a REGEN.
Yet another alternative would be to explore non-Autodesk products. i.e: Bricscad, Graeberts Ares Commander, ZWCad, and others. Lisp support (at much less than the cost of LT).
Too bad the OP already made the investment in LT 2015. Maybe he can get a refund.
John Connor2015-02-17 19:33:49
[QUOTE=John Connor]...Maybe he can get a refund.[/QUOTE]Depends on how "new" he is to LT. Only has 30 days. Don't know what the obligatory Letter of Destruction entails.Cheers
Thanks for the input; however i do not want to put the macros into a button format. I would like to able to do a keyboard input.
Options.1. Edit CUI.2. Use the Action Recorder.3. Use your fingers (ex. Z Enter A Enter).4. Toolbar buttons.5. Programmable mouse.Pick one.BTW...if you double click your mouse wheel AutoCAD will do a zoom > extents which is almost as good as a zoom > all.
John Connor2015-02-20 14:43:53
[QUOTE=stpierre6153]Thanks for the input; however i do not want to put the macros into a button format. I would like to able to do a keyboard input.[/QUOTE]
Defining/(defun)ing them as commands for keyboard input of command names is simply not an option in LT, lacking AutoLisp capability. But as John Connor has suggested, at least in some of your examples, it's not much more work to just do them manually, e.g. to type Z [Enter/space] A [Enter/space] instead of your equivalent command name ZA [Enter/space]. And as I pointed out earlier, your W command can be just Z, since Zoom does the W option without specifying it, if you don't specify something else. Of course the simplicity of manual usage won't be true of a lot of other things you might want to shortcut -- John has already listed the options available to you.
Thank you again. As you pointed out with regard to hitting Z enter invokes the zoom, window I know that........ The PITA with not being able to invoke two commands with one enter is my issue. with 30+ years the hand movement is ingrained.Thank you anyway.