View Full Version : Custom commands
cmason.82472
2005-06-07, 03:43 PM
I would like to create some buttons to do some simple commands. However I need some help.
I am using AutoCAD 2004.
The first one is simple, I want a button to deselect everything so I don't have to hit escape all the time.
Second, I would like a custom command that can draw a line that has the dimension of the line on it. Right now I am using a linear dimension, but I don't like having to click to draw the line, and then a having to click again, to offset the dimension, even though I don't want to offset it at all.
Third it would be nice to have a command to be able to move an object, then when I place it I can rotate it in the same command.
I am strictly working with 2D stuff.
If anybody can help with this that would be great.
Thanks
scwegner
2005-06-07, 03:49 PM
I would like to create some buttons to do some simple commands. However I need some help.
I am using AutoCAD 2004.
The first one is simple, I want a button to deselect everything so I don't have to hit escape all the time.
Second, I would like a custom command that can draw a line that has the dimension of the line on it. Right now I am using a linear dimension, but I don't like having to click to draw the line, and then a having to click again, to offset the dimension, even though I don't want to offset it at all.
Third it would be nice to have a command to be able to move an object, then when I place it I can rotate it in the same command.
I am strictly working with 2D stuff.
If anybody can help with this that would be great.
Thanks
^C^C in a button is the equivelent of hitting escape, though I'm not sure how that's faster. If you're strictly a mouse person, you may also consider making one of your mouse buttons an escape (button five for me).
For move and rotate, have you tried the express tool movecopyrotate?
As for dimensioning lines, try searching through these boards and the http://discussion.autodesk.com/index boards for a lisp. I'm pretty sure there's already one out there which does that.
cmason.82472
2005-06-07, 04:08 PM
^C^C in a button is the equivelent of hitting escape, though I'm not sure how that's faster. If you're strictly a mouse person, you may also consider making one of your mouse buttons an escape (button five for me).
For move and rotate, have you tried the express tool movecopyrotate?
As for dimensioning lines, try searching through these boards and the http://discussion.autodesk.com/index boards for a lisp. I'm pretty sure there's already one out there which does that.
Hey thanks for the advice.
I think setting a mouse button for escape is a great idea but the company I work for doesn't want to shell out the money for a five button mouse, I am lucky I got a scroll mouse.
Thanks again
cmason.82472
2005-06-07, 04:20 PM
I tried using that macro for the deselect problem on a button.
I don't know if I am doing something wrong, because it isn't working
I created a new button, and put ^C^C in the macro box.
Is there anything else to it?
robert.1.hall72202
2005-06-07, 04:53 PM
Have you considered, while in a command, using "U" for undo??? It will deselect the last item picked.
scwegner
2005-06-07, 04:55 PM
I tried using that macro for the deselect problem on a button.
I don't know if I am doing something wrong, because it isn't working
I created a new button, and put ^C^C in the macro box.
Is there anything else to it?
Sorry about that. I forgot that part only cancels active commands. Try this instead:
^C^C(sssetfirst)
RobertB
2005-06-07, 04:56 PM
Have you considered, while in a command, using "U" for undo??? It will deselect the last item picked.
Incorrect advice.
cmason.82472
2005-06-07, 05:07 PM
Thanks man I tried it and it works great!
Mike.Perry
2005-06-07, 09:12 PM
I am using AutoCAD 2004.
The first one is simple, I want a button to deselect everything so I don't have to hit escape all the time.Hi
Why not just hold down the the right mouse button, this will de-select all highlighted (selected) objects. I know this definitely works in AutoCAD 2004 or higher, I will confirm AutoCAD 2002 tomorrow.
Have a good one, Mike
scwegner
2005-06-07, 09:45 PM
Hi
Why not just hold down the the right mouse button, this will de-select all highlighted (selected) objects. I know this definitely works in AutoCAD 2004 or higher, I will confirm AutoCAD 2002 tomorrow.
Have a good one, Mike This only works if you use shortcut menus and (correct me if I'm wrong) not if a command is active. It does work in older versions.
Mike.Perry
2005-06-07, 09:59 PM
This only works if you use shortcut menus and (correct me if I'm wrong) not if a command is active. It does work in older versions.Hi
True, system variable ShortCutMenu has to be set to something other than 0 (zero).
Not quite true, have a look at what happens if you have "Turn on time-sensitive right-click" tuned on.
Hence my AutoCAD 2004 reference.
Have a good one, Mike
LanceMcHatton
2005-06-08, 03:05 PM
I think setting a mouse button for escape is a great idea but the company I work for doesn't want to shell out the money for a five button mouse, I am lucky I got a scroll mouse.
Our company won't buy us nice mice, either. We have about 350 people in our company and about 30-50% of them have purchased their own mice. If your IT dept. (if you have one) is willing to help you install (if you need admin priv) then get your own.
cmason.82472
2005-06-13, 02:38 PM
Hey I hear ya man, we have people here still using the three button mice with no scroll wheel. I can and know how to install a five button mouse, but I don't want to pay for somthing and wear it out working for them. I am working on a 17" monitor too.
rocamar2
2016-08-02, 09:19 PM
Hello, I am working with AutoCAD MEP 2016
I am interested in making my own command where I use the standard move command but I need it to, after selecting the base point, allow me to automatically move the selection 1/8" in a selected direction without having to insert distance and direction every time.
This is the code I have so far (which is the standard move command):
$M=$(if,$(eq,$(substr,$(getvar,cmdnames),1,4),GRIP),_move,^C^C_move)
I have never done programming before, hope somebody can help me.
deveti_omprakash734892
2016-10-26, 11:04 AM
Where I can download the LISP
Tom Beauford
2016-10-26, 02:16 PM
Where I can download the LISP
No LISP in this thread to download.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.