PDA

View Full Version : Hot key/shortcut key for Polar, Osnap & Otrack



son.do
2005-01-24, 09:20 PM
I can't find a way to make a hot key/shortcut key or a customize button to turn these 3 commands on and off at one time.

I use the revision clouds a lot, but I have to turn off all three of these to use it to make my clouds. I want to make a button so I can turn on/off these 3 things at one time. I hate having to turn off 3 of them one by one just so I can make a cloud, then having to turn all 3 back on again one by one.

I'm talking about F3, F10 & F11. Put these in one shortcut key so I can turn on/ff.

scwegner
2005-01-24, 10:57 PM
I can't find a way to make a hot key/shortcut key or a customize button to turn these 3 commands on and off at one time.

I use the revision clouds a lot, but I have to turn off all three of these to use it to make my clouds. I want to make a button so I can turn on/off these 3 things at one time. I hate having to turn off 3 of them one by one just so I can make a cloud, then having to turn all 3 back on again one by one.

I'm talking about F3, F10 & F11. Put these in one shortcut key so I can turn on/ff.

Sounds like you should make a lisp that will change them and then set a hotkey to run the lisp or type at the command line. Or just use a button macro. Do you need help doing that?

Mike.Perry
2005-01-25, 08:53 AM
Hi

Please note I've *moved* this thread from the AutoCAD (http://forums.augi.com/forumdisplay.php?f=121) Forum to this one as I feel this particular Forum is a more appropriate place for such a topic.

Thanks, Mike

Forum Moderator

son.do
2005-01-25, 08:04 PM
I don't have a clue where to start about lisp. Yes, I need you to walk me through it.

thanks

scwegner
2005-01-25, 09:36 PM
I don't have a clue where to start about lisp. Yes, I need you to walk me through it.

thanks

Wait. Just a thought, but why? I know they re-did revcloud for 2004 and 2005 so it's different from what I'm using but those settings don't make a difference for me. Is that not the case anymore? Whatever, I'll just trust you.
Anyway, here's a very simple little LISP. There are probably many better ways to do it, but I don't see anyone else jumping in so:


;;;Toggles osnaps and polar tracking on or off
;;;I've added a few notes to explain what's happening in case you're curious

(defun c:toggle (/ ocmdecho);names the function and lists temporary variables
;;;it is written so thatit runs when you type "toggle" at the command line
;;;to change the keys you type in, change toggle above to whatever you want
;;;just be sure what you choose isn't already a command

(setq ocmdecho (getvar "cmdecho"));save command line echo settings
(setvar "cmdecho" 0);turn off command line echo

(if
(= (getvar "autosnap") 0);if polar and otrack are off
(setvar "autosnap" 63);then turn on polar and otrack
(setvar "autosnap" 0);else turn them off
);close if

(setvar "cmdecho" ocmdecho);restore command line echo settings

(princ)
)

Copy that to notepad or something and save it as toggle.lsp (or something else ending in .lsp) in your AutoCAD support folder. Then open CAD and go to TOOLS>>>AUTOLISP>>>LOAD. When the dialog box opens up, click on "startup suite" then "add". Browse to where you just saved toggle.lsp and select it. Once you've done that, any time you load CAD you can type "toggle" (or whatever you changed it to) on the command line and it'll turn off polar and otrack.
It sounds like you already know how to change hotkeys, so just make one that acts as if you typed in "toggle" (or whatever you changed it to).
Clear as mud?

son.do
2005-01-26, 06:30 PM
Actually, the marker for osnaps is turned off. When I type toggle, it turns off polar, otrack, and turns off the autosnap setting marker. So I have to go to options and check the box for marker in autosnap settings to turn the osnaps marker on.

Can you just make it so it turns off polar and otrack, but not the autosnap setting marker.

Thanks