CAD Forum - Database of tips, tricks and utilities for AutoCAD, Inventor and other Autodesk products [www.cadforum.cz]
CZ | EN | DE
Login or
registration
  Visitors: 6033
RSS channel - CAD tips RSS tips
RSS discussions

Discussion Discussion forum

 

HelpCAD discussion

 
CAD Forum - Homepage CAD discussion forum - ask any CAD-related questions here, share your CAD knowledge on AutoCAD, Inventor, Revit and other Autodesk software with your peers from all over the world. To start a new topic, choose an appropriate forum.

Please abide by the rules of this forum.

How to post questions: register or login, go to the specific forum and click the NEW TOPIC button.
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedMacro

 Post Reply Post Reply
Author
stpierre6153 View Drop Down
Newbie
Newbie


Joined: 16.Feb.2015
Location: United States
Using: AutoCAD LT 2015
Status: Offline
Points: 4
Direct Link To This Post Topic: Macro
    Posted: 16.Feb.2015 at 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,
Stpirre6153
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 16.Feb.2015 at 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.


Edited by John Connor - 17.Feb.2015 at 13:15
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 616
Direct Link To This Post Posted: 17.Feb.2015 at 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:
 
'ZOOM A
 
'ZOOM P
 
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.
Back to Top
Robert_D View Drop Down
Senior Member
Senior Member


Joined: 21.Oct.2013
Location: United States
Using: BricsCAD v21, AutoCAD2006
Status: Offline
Points: 207
Direct Link To This Post Posted: 17.Feb.2015 at 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).
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 17.Feb.2015 at 19:33
Too bad the OP already made the investment in LT 2015.  Maybe he can get a refund.


Edited by John Connor - 17.Feb.2015 at 19:33
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Robert_D View Drop Down
Senior Member
Senior Member


Joined: 21.Oct.2013
Location: United States
Using: BricsCAD v21, AutoCAD2006
Status: Offline
Points: 207
Direct Link To This Post Posted: 17.Feb.2015 at 21:15
Originally posted by John Connor John Connor wrote:

...Maybe he can get a refund.
Depends on how "new" he is to LT. Only has 30 days. Don't know what the obligatory Letter of Destruction entails.
Cheers


Edited by Robert_D - 17.Feb.2015 at 21:16
Back to Top
stpierre6153 View Drop Down
Newbie
Newbie


Joined: 16.Feb.2015
Location: United States
Using: AutoCAD LT 2015
Status: Offline
Points: 4
Direct Link To This Post Posted: 20.Feb.2015 at 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.
Stpirre6153
Back to Top
John Connor View Drop Down
Senior Member
Senior Member


Joined: 01.Feb.2011
Location: United States
Using: AutoCAD 2018
Status: Offline
Points: 7175
Direct Link To This Post Posted: 20.Feb.2015 at 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.


Edited by John Connor - 20.Feb.2015 at 14:43
"Humans have a strength that cannot be measured. This is John Connor. If you are reading this, you are the resistance."

<<AutoCAD 2015>>

Back to Top
Kent Cooper View Drop Down
Senior Member
Senior Member


Joined: 12.Mar.2013
Location: United States
Using: AutoCAD2020, 2023
Status: Offline
Points: 616
Direct Link To This Post Posted: 20.Feb.2015 at 17:37
Originally posted by stpierre6153 stpierre6153 wrote:

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.
 
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.
Back to Top
stpierre6153 View Drop Down
Newbie
Newbie


Joined: 16.Feb.2015
Location: United States
Using: AutoCAD LT 2015
Status: Offline
Points: 4
Direct Link To This Post Posted: 24.Feb.2015 at 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.
Stpirre6153
Back to Top

Related CAD tips:


 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0,469 seconds.