Show full version of the posting: Macro

16.02.2015, 22:34
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,

John Connor
16.02.2015, 23:04
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

Kent Cooper
17.02.2015, 16:30
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.

17.02.2015, 19:17
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).

John Connor
17.02.2015, 19:33
Too bad the OP already made the investment in LT 2015.  Maybe he can get a refund.
John Connor2015-02-17 19:33:49

17.02.2015, 21:15
[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
Robert_D2015-02-17 21:16:34

20.02.2015, 14:00
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.

John Connor
20.02.2015, 14:39
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

Kent Cooper
20.02.2015, 17:37
[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.

24.02.2015, 19:44
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.