Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Shortcut keys

3 REPLIES 3
Reply
Message 1 of 4
cnweems
281 Views, 3 Replies

Shortcut keys

Are you able to set a shortcut key to a variable change? In particular I am trying to set a key to change the Osnapz to change from 0 to 1 and then back with a push of the button.

3 REPLIES 3
Message 2 of 4
Patchy
in reply to: cnweems

You can use a shortcut key to turn it from 1 to 0 and then another one to turn it back with autolisp.

 

Message 3 of 4
cnweems
in reply to: Patchy

Thank you. I guess it is time I learned how to write an autoliisp.

 

Message 4 of 4
Kent1Cooper
in reply to: cnweems

For any System Variable for which the only valid values are 0 and 1, you can use a single operation to toggle between whatever the current value is and the other value [whether you assign it to a shortcut key, a toolbar button or other menu item, a command name, whatever]:

 

(setvar 'YourSystemVariableName (- 1 (getvar 'YourSystemVariableName)))

 

If it's currently 0, it ends up being set to 1, and vice versa.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost