PDA

View Full Version : command hot keys



alkorm77
14th Nov 2006, 06:25 am
Is it possible to assign hot keys to all commands in a customisable way? For example if i want to draw a line, can i just hit 'L'? instead of 'L + space'

Lazer
22nd Nov 2006, 07:09 pm
But then you would not be able to type ltscale (linetype scale) or la (layer manager) le (quick... you get the idea. The command line is very powerfull to take away the enter(space) after a command would spoil all other commands.

StykFacE
22nd Nov 2006, 07:20 pm
Is it possible to assign hot keys to all commands in a customisable way? For example if i want to draw a line, can i just hit 'L'? instead of 'L + space'
change your right-click settings in Options to where it becomes "Enter". this way you won't always have to use Spacebar.

alkorm77
22nd Nov 2006, 10:45 pm
But then you would not be able to type ltscale (linetype scale) or la (layer manager) le (quick... you get the idea. The command line is very powerfull to take away the enter(space) after a command would spoil all other commands.

I realise the command line is very powerful, and sometimes it is very useful. I'm asking if you can fully customise your keyboard for any command. So if ltscale was something you used regularly, why not make it 'alt + l' or something along those lines. What i'm suggesting can cut seconds out of each command, especially for 3D modelling. I used to use Solidworks at my previous work and along with another designer we had our Cad systems so customised for 95% of the tools we used, and was left with only one tool bar on the screen. OK, it took a couple of months to learn and there was an A3 spreadsheet stuck to my office wall with the hot keys defined for each command, but after that couple of months, in an office of 10 designers, we were modelling and producing drawings 40% faster than the other 8. Now that is productivity. So my question still stands, can you customise commands with hot keys?

dbroada
23rd Nov 2006, 09:34 am
interesting isn't it. The 2 fastest in our office only use the keyboard with everything defined in one or two keystrokes (plus <space>). It is painful watching all the others using menus and toolbars.

just an observation - no help to your problem.

thalon
23rd Nov 2006, 03:08 pm
I don't think you can get autocad to understand just pushing L. But Ctrl+L or Alt+L would definately be possible.
I'm using 2005 and to customize the key board I go to "Tools" -> "Customize" -> "Keyboard"

StykFacE
23rd Nov 2006, 04:03 pm
I realise the command line is very powerful, and sometimes it is very useful. I'm asking if you can fully customise your keyboard for any command. So if ltscale was something you used regularly, why not make it 'alt + l' or something along those lines. What i'm suggesting can cut seconds out of each command, especially for 3D modelling. I used to use Solidworks at my previous work and along with another designer we had our Cad systems so customised for 95% of the tools we used, and was left with only one tool bar on the screen. OK, it took a couple of months to learn and there was an A3 spreadsheet stuck to my office wall with the hot keys defined for each command, but after that couple of months, in an office of 10 designers, we were modelling and producing drawings 40% faster than the other 8. Now that is productivity. So my question still stands, can you customise commands with hot keys?
to answer your question: no (as far as i know, you can't, not the way you're wanting)

it's simply not how AutoCAD works, without the Spacebar/Enter step. you will just have to adapt. partly the reasoning behind they way it is, is because there are simply tooooo many commands and other things involved to completely take away Spacebar/Enter step when using AutoCAD, even a quarter of the potential.

and my question is why would you use commands like "Alt+L"?? that seems like even more trouble than the way AutoCAD is defaulted to in the first place, lol. for me to hold Alt and stretch my finger across the keyboard to press L is far more complicated than me hitting L+right-clicking the mouse to execute the LINE command. just my $0.02 - don't take anything the wrong way.... 8)

alkorm77
27th Nov 2006, 05:11 am
hello Stykface,

thanks for your reply, i am not offended. First, the old right click on the toolbar and customize option seems to be limited, so hot keys can only be reassigned to certain commands. I realise acad is big, real big, but others softwares can do it, and they are bigger. its just for those commands you wish to use often but can never seem to find a quik way. Like explode, you either need to find the toolbar button (more difficult if you run dual monitors) or type expode in the command prompt and then hit enter, would'nt ex + enter be faster? the LINE command is probably not the best example, but by the way, my keboard has 2 ALT buttons!
Its all in the programming i think. I started my career with acad, worked with it for 4 years, then went to Solidworks and now back to acad. SW is very adaptable in this sort of way and its hard to go back

Cad64
27th Nov 2006, 05:23 am
You can assign keyboard shortcuts to any command in Autocad by modifying your acad.pgp file. For instance, you don't have to type the word 'Explode' every time you want to use that tool. I have mine set to just 'X' and then Right Click to initiate. Autocad is just as customizable as any other program.

alkorm77
27th Nov 2006, 05:41 am
You can assign keyboard shortcuts to any command in Autocad by modifying your acad.pgp file.

Great, how?

Cad64
27th Nov 2006, 05:55 am
Go to your Tools pull down menu > Customize > Edit Program Parameters. This will open your acad.pgp file with Notepad. Scroll down to see all of the current commands and their aliases. They are written in the format: CI, *CIRCLE where CI is the alias and *CIRCLE is the Autocad command. If you want to modify these commands or create aliases for other commands, the best thing to do is scroll to the bottom of the file. There is a section there for "User Defined Command Aliases". Anything you put in this section overrides any previous command in the list above and will migrate when you install newer versions.

Note: After you make changes to the pgp file and save it. Type REINIT at the command line. This will open the Re-initialization dialog and allow you to reload your pgp file and use your new commands without having to close and re-open Autocad.

dbroada
27th Nov 2006, 10:03 am
Cad64 - I didn't kow that! (Shows how often I use menus.) I have always either modified it from outside Acad or have used the Express|Tools|Command Alias editor. Your one is better.

StykFacE
27th Nov 2006, 02:49 pm
Go to your Tools pull down menu > Customize > Edit Program Parameters. This will open your acad.pgp file with Notepad. Scroll down to see all of the current commands and their aliases. They are written in the format: CI, *CIRCLE where CI is the alias and *CIRCLE is the Autocad command. If you want to modify these commands or create aliases for other commands, the best thing to do is scroll to the bottom of the file. There is a section there for "User Defined Command Aliases". Anything you put in this section overrides any previous command in the list above and will migrate when you install newer versions.

Note: After you make changes to the pgp file and save it. Type REINIT at the command line. This will open the Re-initialization dialog and allow you to reload your pgp file and use your new commands without having to close and re-open Autocad.
Also i would like to state to do a Save As on this file in a safe location before making changes.

TimZilla
8th Mar 2008, 06:18 pm
I know everybody here is talking about hot-keys for commands like line, circle and so on. I want to know is there a way to set up your layers on hot keys?

I am new to Auto cad and I use it to design Fire Sprinklers using hydra CAD which is a program that works with Auto CAD. It has a bunch of pre-made layers that we have to use. I switch back and forth between 10 different layers and I hate having to change my current layer the hard way. I found the pc (pick current) command but even that is to slow. Having to type in pc+enter+ click the mouse on the layer on the drawing I want to change to. If i could hit W and be in the "walls" layer and p and be in the "pipe" layer and so on It would save me a good hour or two a day. This is probably a very stupid question and I'm sure there is a way to do this and I should already know. I took the basic ACAD class and went right into the office designing. Yes, for your information the Fire Sprinkler industry is desperate for designers and will pay out the @$$ to get them.You have to learn a lot of codes from the NFPA13, thats the only hard part.

if someone could give me some good advice I would be very thankful.

dbroada
8th Mar 2008, 06:25 pm
to change a current layer I drop the layer list down (TL corner of my screen) and click on it there.

In fact I don't change current layers that often. I tend to draw everything on 0 then change layers later using either the properties box or properties painter tool.

lpseifert
8th Mar 2008, 06:29 pm
Put this in your acaddoc.lsp file

(defun c:w ()
(setvar "clayer" "wall"))

TimZilla
8th Mar 2008, 06:35 pm
to change a current layer I drop the layer list down (TL corner of my screen) and click on it there.

In fact I don't change current layers that often. I tend to draw everything on 0 then change layers later using either the properties box or properties painter tool.

well the Hydra Cad program has a whole bunch of toolbars for example" walls, steel, main pipe, line pipe, ceiling. These are all on toolbars and when you click that toolbar it switches you to that layer which is great. What sucks is that it has its own OSNAPS set for each of those layers. So everytime I click, say...my walls layer button on the toolbar it resets my damn osnaps, turns polar off and turns on ortho! which drives me crazy. So its cool that it automatically puts me in that layer but i have to go in and reset my osnaps, ortHOE and polar everytime. Is there a way that I can edit the osnaps on the on each toolbar button? so each button has the osnaps set to fit that layer the best for me?

TimZilla
8th Mar 2008, 06:38 pm
Put this in your acaddoc.lsp file

(defun c:w ()
(setvar "clayer" "wall"))



is that a reply to me? if so I would love if you could be more specific because im still a newbie at this, lol. I dont know where my acaddoc.Isp is, what it is, or what to do with it.

dbroada
8th Mar 2008, 06:47 pm
I think the reply was for you but if you are using LT I don't think you have any lisp functionality - so it won't work. Another problem is know very little about LT so can't be of too much help either.

In full AutoCAD you can add your own buttons or modify the existing ones. What happens if you type CUI?

TimZilla
8th Mar 2008, 06:51 pm
I think the reply was for you but if you are using LT I don't think you have any lisp functionality - so it won't work. Another problem is know very little about LT so can't be of too much help either.

In full AutoCAD you can add your own buttons or modify the existing ones. What happens if you type CUI?

no, i need to change that. I do use the full Auto Cad 2008 at home. At work I use Auto Cad 2007. no LT, sorry ill go change that now.

lpseifert
8th Mar 2008, 06:52 pm
is that a reply to me? if so I would love if you could be more specific because im still a newbie at this, lol. I dont know where my acaddoc.Isp is, what it is, or what to do with it.
<It will only work in full Acad, not LT>
At the command line enter (findfile "acaddoc.lsp")
If the file is found, open the file with Notepad and enter the above code and save.
If it returns nil, start a new file with Notepad, enter the above code, and save as acaddoc.lsp in the support folder of Autocad.

After you start acad, entering w enter will set the Wall layer current. Copy the code and edit for each layer you want.

If you also want to set the osnap settings and layer you can do something similar to this



(defun c:w ()
(setvar "clayer" "wall")
(setvar "osmode" (+ 16384 3))
)


The osnap setting is determined by the red 3 in the code. Edit it to your desired osnap settings, it should be the sum of bitcodes shown below. e.g. Mid+Endpoint = 3 Center+Mid = 6



0 NONe
1 ENDpoint
2 MIDpoint
4 CENter
8 NODe
16 QUAdrant
32 INTersection
64 INSertion
128 PERpendicular
256 TANgent
512 NEArest
1024 QUIck
2048 APParent Intersection
4096 EXTension
8192 PARallel

dbroada
8th Mar 2008, 07:02 pm
At work I use Auto Cad 2007. no LT, sorry ill go change that now.In that case you can create your own toolbar and put your own layer settings on each button. I can't help you as I'm at home and don't trust my memory. Have a look in the FAQ to see if there is a "create a toolbar" section or look for similar threads.

lpseifert was demonstrating how to add a command into AutoCAD by modifying one of LISP routines that is loaded every time you start AutoCAD. Another trick worth investigating.

TimZilla
8th Mar 2008, 07:11 pm
I just noticed you are running LT so the above won't work...

yes, just changed that in my profile. I do use regular AutoCad, the full version. At work i was supposed to be trained on this stuff but im having to learn as I produce jobs. Although I'm a rookie I'm still bringing jobs in under hours. The other three guys I work with are trainee's as well and I like to take extra steps to stay above of them. Finding out ways to do stuff like you speak about would make me the top dawgy when it comes to raise time!

TimZilla
9th Mar 2008, 05:37 am
<It will only work in full Acad, not LT>
At the command line enter (findfile "acaddoc.lsp")
If the file is found, open the file with Notepad and enter the above code and save.
If it returns nil, start a new file with Notepad, enter the above code, and save as acaddoc.lsp in the support folder of Autocad.

After you start acad, entering w enter will set the Wall layer current. Copy the code and edit for each layer you want.

If you also want to set the osnap settings and layer you can do something similar to this



(defun c:w ()
(setvar "clayer" "wall")
(setvar "osmode" (+ 16384 3))
)
[color=Magenta][color=Black]

The osnap setting is determined by the red 3 in the code. Edit it to your desired osnap settings, it should be the sum of bitcodes shown below. e.g. Mid+Endpoint = 3 Center+Mid = 6


First, I would like to say Thank you very much. It worked very well. So cool being able type w+enter and be in my walls layer just like that. One thing I am having trouble with though is...

they way you have the code works by turning the correct snaps although osnaps is off. how to I get it to where the osnaps is already on when I turn my layer on.

also, as I said i have a bunch of buttons on my toolbars that turn certain layers on when you click them. Its HydraCAD. those come with preset osnaps and ortho on and polar off. Would you happen to know how to edit those?

this is very cool man and I thank all of you guys who help very much.

TimZilla
9th Mar 2008, 07:34 am
another quick one.

(defun c:w ()
(setvar "clayer" "wall")
(setvar "osmode" (+ 16384 3))
)


this "clayer" iswhat i type in to make a hotkey for a layer right?
what do i type in if i want to make a certain command a hot key?
would it be "ccommand" ? would it be in the same format and under the same notepad acaddoc?

(defun c:t ()
(setvar "ccommand" "trim")

would that work?

Cad64
9th Mar 2008, 08:25 am
There is already a command alias for the Trim command. It's TR. Check your acad.pgp file for a list of all the command keyboard shortcuts. Tools Menu > Customize > Edit Program Parameters(acad.pgp)

dbroada
9th Mar 2008, 09:36 am
as Cad has said, look at your PGP file, most of the AutoCAD commands have a "shortcut" already defined there. If you have express tools installed there is a section for something like "command alias editor" - check that out.

What lpsiefert has shown is how to create a brand new command, in this case called W. All it does is change a number of system variables. In this case Current LAYER and the snap setting. You can use this method to create other commands or modify existing ones but you need to be certain of what you are doing as it is possible to disable (for example) the save command with nasty consequences.

lpseifert
9th Mar 2008, 02:22 pm
they way you have the code works by turning the correct snaps although osnaps is off. how to I get it to where the osnaps is already on when I turn my layer on.



(defun c:w ()
(setvar "clayer" "walls")
(setvar "osmode" 3)
)

Let me break it down for you...
(defun c:w () Define a new command named w
(setvar "clayer" "walls") Set the variable clayer [current layer] to Walls
(setvar "osmode" 3) Set the variable osmode [osnap mode] to 3
) End of function definition


(defun c:t ()
(setvar "ccommand" "trim")

would that work?

Nope. As Cad64 pointed out there is an alias (shortcut) already defined for trim in your acad.pgp file (and a whole lot more), and that is the best way to make an alias for a single command.
That being said, here is an alternative method per your question


(defun c:t ()
(command "trim")
)
This method works if you want to add an option to the command, e.g. Zoom > Extents


(defun c:ze ()
(command "zoom" "e")
)

TimZilla
9th Mar 2008, 11:41 pm
My layer Isolate is different on 08 than 07. On 07 it isolates the layer I pick by turning all the other layers off. On 08 it isolates the layer I pick by locking every other layer. I know this might be a better way for most. I use it for pipe sizing, if i have to make a change .I isolate just the pipe sizes, highlight all of them, hit properties and change them all at once. Using 08 with the lock feature it wont let me do that. Is there any way I can change it to where it turns it off instead of locking it?

Cad64
10th Mar 2008, 12:13 am
I believe CarlB already gave you the answer to this question in your other thread? :?
http://www.cadtutor.net/forum/showthread.php?t=21048

Initiate the LAYISO command, then type S for Settings. This will allow you to specify whether you want the other layers to be locked and faded or just turned off like in previous versions. Watch your command line.

TimZilla
10th Mar 2008, 12:43 am
I believe CarlB already gave you the answer to this question in your other thread? :?
http://www.cadtutor.net/forum/showthread.php?t=21048

Initiate the LAYISO command, then type S for Settings. This will allow you to specify whether you want the other layers to be locked and faded or just turned off like in previous versions. Watch your command line.

yeah i know but I'm new to this and and I only know how to do enough to get my job at work done. I am tired of doing stuff the long way so I'm seeking help. That being said Carl B's instructions were not detailed enough, lol. I need to add a signature to my name that says "When giving me instructions be very detailed. Start with " now move your mouse to the left and click that thing that looks like......."

Your answer is a lot better man. Thanks.

You'll be sick of answering my questions after a week or two because I have a million more. One at a time though.

Cad64
10th Mar 2008, 01:11 am
You'll be sick of answering my questions after a week or two because I have a million more. One at a time though.

No worries, ask away. :) Just take it one step at a time.
Before you know it, you'll be answering other people's questions. :wink:

TimZilla
11th Mar 2008, 03:38 pm
No worries, ask away. :) Just take it one step at a time.
Before you know it, you'll be answering other people's questions. :wink:

I work with Fire Sprinklers using a program called HydraCAD. There is a plot style we have called Hydragrey. Which basically prints certain things darker than other based on the layer ( not color )

I want to make it to where it prints my walls a little bit darker. Ive tried changing the color and that's when i figured it was set up by layer. Any advice on a way to edit this?

Ive looked all around and couldn't figure it out. :x

AZCOACHB
21st Jul 2009, 06:40 pm
I work with Fire Sprinklers using a program called HydraCAD. There is a plot style we have called Hydragrey. Which basically prints certain things darker than other based on the layer ( not color )

I want to make it to where it prints my walls a little bit darker. Ive tried changing the color and that's when i figured it was set up by layer. Any advice on a way to edit this?

Ive looked all around and couldn't figure it out. :x


You should learn AutoSPRINK. :wink:

AZCOACHB
21st Jul 2009, 06:44 pm
There is already a command alias for the Trim command. It's TR. Check your acad.pgp file for a list of all the command keyboard shortcuts. Tools Menu > Customize > Edit Program Parameters(acad.pgp)

I opened my acad.pgp file, change my *CIRCLE command to "CI" and *COPY to "C". I also changed *DIMSTYLE to "DI" and *DISTANCE to "D".

I saved, closed both the .pgp file and the program, opened the program back up and...back to the original settings even though the .pgp file still has the changes I made.

What am I doing wrong?

rkent
21st Jul 2009, 06:57 pm
I opened my acad.pgp file, change my *CIRCLE command to "CI" and *COPY to "C". I also changed *DIMSTYLE to "DI" and *DISTANCE to "D".

I saved, closed both the .pgp file and the program, opened the program back up and...back to the original settings even though the .pgp file still has the changes I made.

What am I doing wrong?

Did you get to the acad.pgp using menus? Tools>Customize>Edit Program Parameters (acad.pgp)

You must have more than one acad.pgp on your computer and the one you edited must not be in the search path or is called in the search path before the other one. Either way getting to the file as shown above will fix that.

rkent
21st Jul 2009, 07:04 pm
I realise the command line is very powerful, and sometimes it is very useful. I'm asking if you can fully customise your keyboard for any command. So if ltscale was something you used regularly, why not make it 'alt + l' or something along those lines. What i'm suggesting can cut seconds out of each command, especially for 3D modelling. I used to use Solidworks at my previous work and along with another designer we had our Cad systems so customised for 95% of the tools we used, and was left with only one tool bar on the screen. OK, it took a couple of months to learn and there was an A3 spreadsheet stuck to my office wall with the hot keys defined for each command, but after that couple of months, in an office of 10 designers, we were modelling and producing drawings 40% faster than the other 8. Now that is productivity. So my question still stands, can you customise commands with hot keys?

AutoCAD can be customized numerous ways to do what you seek. For the Hot Keys use the CUI file. Type CUI at the command line and customize there (see help file). For other key definitions requiring an enter,space bar, right click, edit the ACAD.PGP, and or create an acaddoc.lsp file. Finally a toolbar with your most frequent commands can be made easily enough. Also, buy a multi button mouse and customize those as well.

AZCOACHB
21st Jul 2009, 07:53 pm
Did you get to the acad.pgp using menus? Tools>Customize>Edit Program Parameters (acad.pgp)

You must have more than one acad.pgp on your computer and the one you edited must not be in the search path or is called in the search path before the other one. Either way getting to the file as shown above will fix that.


Okay, I figured out what the problem is. The .pgp that I had originally edited is in my local AutoCAD 09 program file (which I had accessed externally). When I go through the program to access the .pgp file, it calls one that is set by my office's system administrator and I have 'read-only' access to it.

Is there a way to bypass or supercede the stupid generic .pgp file? I can't find a place to alter the pathname of the .pgp file that my program references. I'm sure someone knows how to do this, though.

rkent
21st Jul 2009, 08:39 pm
Is there a way to bypass or supercede the stupid generic .pgp file? I can't find a place to alter the pathname of the .pgp file that my program references. I'm sure someone knows how to do this, though.


I stopped editing the pgp file years ago and just use three custom lisp files for all my settings. I have the acaddoc.lsp and that has lots of autoload calls to lots of lisp files I use, it also loads a Personal_Qkeys.lsp file that duplicates what others might have in the pgp, then I have a Personal_Settings.lsp file that sets the various setvars I want to always be set to a certain value. This could be in one file but I like the separation.

You can go into the Options, Files, support file search path and make sure your path to your pgp is in there, then move it to the top (I think that is right, experiment having it at the top and at the bottom, I can't remember which order files are loaded).

Ryder76
21st Jul 2009, 08:51 pm
Express menu

Tools/Command Alias Editor

OOPS - skimming, sorry.

adamshive
27th May 2010, 12:42 pm
interesting isn't it. The 2 fastest in our office only use the keyboard with everything defined in one or two keystrokes (plus <space>). It is painful watching all the others using menus and toolbars.

just an observation - no help to your problem.

I'm getting sick of cleaning blood off the walls of my office. Whenever a fellow engineer watches how fast I draw using keyboard commands (not even having to look at the keyboard while I use it) their heads explode.

adamshive
27th May 2010, 12:44 pm
In most windows-based software just hit the "Alt" key. Any letter that appears underlined in a command menu will then be a hot key. Almost every program features the copy/cut and paste commands- ctrl+c, x, or v.

When using a ctrl command you hold down ctrl while hitting the next key.

When using an alt key command you hit and release alt before entering the next key.

In autocad 2009 I use alt-d-l,t,c-d, c-r, etc all the time. Same for dimensioning and all the others. Dims would be alt-n-l, o, b, etc

adamshive
27th May 2010, 02:43 pm
I work with Fire Sprinklers using a program called HydraCAD. There is a plot style we have called Hydragrey. Which basically prints certain things darker than other based on the layer ( not color )

I want to make it to where it prints my walls a little bit darker. Ive tried changing the color and that's when i figured it was set up by layer. Any advice on a way to edit this?

Ive looked all around and couldn't figure it out. :x

Did you get an answer to this yet?

If you give me more info I'm sure I could help you.

Are you saying the color is set "by block"?

Are you printing in greyscale?

MotoGirl
27th May 2010, 03:38 pm
I'm getting sick of cleaning blood off the walls of my office. Whenever a fellow engineer watches how fast I draw using keyboard commands (not even having to look at the keyboard while I use it) their heads explode.

I'm the same way, they teach "buttons", 'Menus" and "tool bars" in any classes i've been too. it's funny as heck to watch them wonder around the screen looking for something, and notice that their drawing space is little bitty thing cause they have ALL the menus out. Here's my short cuts.

every thing is kept to the left side of the keyboard for even fast use with on hand on the keyboard one had on the mouse.

f, *line
a, *mirror
g, matchprop
c, *COPY
v, *MOVE
g, *MATCHPROP
r, *ROTATE
ex, *EXPLODE
o, *offset
sd, *dimlinear
ad, *dimaligned
rc, *revcloud
sc, *scale
tr, *Trim
et, *extend
ct, *chamfer
bd, *Cads_rc_Sod
ab, *Cads_rc_AssignRelease
ad *cads_rc_AssignBars
rd, *cads_rc_OrderDlg
RE, *Cads_Rc_Sync
B, *cads_rc_bars
ba, *Cads_RC_MM
x, *cads_rc_range
REF, *cads_rc_barref
red, *cads_rc_dlg_edit
ss, *cads_rc_stretch
cfg, *cads_rc_config
QT, *cads_rc_tools
ta, *cads_rc_ptake
VR, *CADS_VPM_CREATE_VIEWPORT
DE, *DIST
xD, *xLINE
R, *ROTATE
RT, *Laymcur
CR, *LAYCUR
CC, *CIRCLE
RC, *REVCLOUD
SQ, *SPLINE
qs, *qsave
Q1, *cads_rc_leader1
Q2, *cads_rc_leader2
Q3, *cads_rc_leader3
as, *layoff
ft, *fillet
fd, *find
s2v, *cads_rc_set2view
v2s, *cads
ed, *cad_rc_lbar
ff, *'osnap