Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to assign multi-key hotkeys in SW...and more.

8 views
Skip to first unread message

Tin Man

unread,
Apr 4, 2006, 11:47:46 PM4/4/06
to
You can do it but it requires using a macro, see below for explaination
(sorry it's so long/wordy).

The macro is called HotkeyCommander. The reasons I wrote the macro were
to
-Allow Hotkeys in SolidWorks to be created that are multipe-character
combinations long.
-Simulatate a CommandLine interface/behavior in SolidWorks similar to
AutoCAD's for running macros.
-Create an interface that would commonize macro use and Hotkey
combinations among multiple Users.
-Easily repeat the last run macro command.

Basically all the macro does is list a bunch of other macros with their
descriptions and allow you to run those other macros right from the
HotkeyCommander macro interface. To run the other macros, you just have
to enter a Hotkey combination in the dialog box (which can be set to
any alpha-numeric combination from as little as one-character to a
combination with any number of characters you want to use), or there is
a more graphical display interface available too (hit the Expand button
and look at the bottom of the dialog box) that lists the macros by
categories.

There is an Excel file, HotkeyCommander.xls, that is used to
organize/sort/keep track of all the macros and it creates the data
file, HotkeyCommander.csv, that the HotkeyCommander macro uses to
display/find the other macros.

There is a text file, HotkeyCommander-README.txt, included that should
be looked at first after unzipping. It contains thorough instructions.
Additional instructions are in the Excel file to help in editing it as
well.

The HotkeyCommander macro is already set up to run 39 "other"
macros that are included in the zip file. Some of these are macros I've
accumulated over the years that were written by others, and some of the
other macros were started from someone else's macro and modified. The
rest were done be me. I've left the original author's information in
the macros if available as well as provided a list of acknowledgements
and links in the text file.

Some of those 39 macros can perform multiple different functions, so
there are actually 57 different macro "Hotkey" calls already
available in the HotkeyCommander.

Some of the most frequently used hotkeys/commands by me are:
0/Change Precision to 0 place (primary units) and appropriate precision
alt units (for inch and mm).
1/Change Precision to 1 place (primary units) and appropriate precision
alt units (for inch and mm).
2/Change Precision to 2 place (primary units) and appropriate precision
alt units (for inch and mm).
3/Change Precision to 3 place (primary units) and appropriate precision
alt units (for inch and mm).
4/Change Precision to 4 place (primary units) and appropriate precision
alt units (for inch and mm).
UT/Toggles document units between INCH and MM.
DEF/Sets document settings to default values.
UTD/Toggles document units between INCH and MM and sets document
settings to default values.
MC/Add Coincident Mate
MO/Add Concentric Mate
MP/Add Parallel Mate
SO/Show Only Selected Components.
SA/Show All Components.
C/Change part color to a random color.
CC/Remove all colors from part

With my "wordy" instructions and the existing structure, it should not
be hard to set this up, start using it, and start adding your own
macros to it if desired.

Download the macro at the location below and let me know what you
think.
http://kcswug.com/programs/macros/HotkeyCommander.zip

***************************
Other points to ponder to possibly increase efficiency:

Another driving reason to write the HotkeyCommander macro was that I
was out of single-keystroke Hotkeys. I ran out of keys because I can't
stand hunting thru all the different RMB menus, so many of the keys
were assigned to native SW commands as well as macros.

I find the [Shift]+? or the [Alt]+? combinations to be very cumbersome
and painful to my wrist. I do use [Ctrl]+? combinations, but only for
keys within a range of about 3 rows away from the left side [Ctrl] key.
And [Shift]+[Ctrl]+? combinations are nearly impossible with one hand.

Now with the HotkeyCommander macro available, I have all 26 letters and
all of the [Function] keys mapped as Hotkeys....only 4 of those call
macros. All of the other keys are set to initiate native SW commands
(like draw Sketch Line, or Sketch Circle, or Mate, or Move, etc...). So
with the HotkeyCommander macro used (nearly) strictly for macros, that
freed up many keys on my keyboard to be assigned to the native SW
commands.

An additional note not related to the HotkeyCommander macro...I have
found a mouse with programmable buttons to be very useful as well. Now
on my mouse I can have buttons for [Enter], [Shift], [Ctrl],
[Shift]+[Ctrl], Isometric View. Notice that with the [Shift], [Ctrl],
and/or [Shift]+[Ctrl] capability with the hand at the mouse, this could
open up 3 whole new keyboards of possible native SW Hotkeys that will
only require your non-mouse hand to hit one key.

Lastly, currently I use a programmable keypad for my views, and have
found it pretty handy. It is set up (similarly to the keypad macros
Wayne Tiffany has encouraged use of) with the 5 as Front, 8 as Top, 2
as Bottom, 4 as Left, 6 as right, etc...And since my programmable
keypad setting on the left (i.e. non-mouse) side of the keyboard, I can
change views with single-keystrokes. This is another method that hasn't
let SW force me into relying on the [SpaceBar] for View Orientations,
and has allowed me to instead use the [SpaceBar] to call the
HotkeyCommander macro without causing me any withdrawl issues :^).

Let me know what you think,
Ken

John Layne

unread,
Apr 5, 2006, 12:06:12 AM4/5/06
to
Thanks,

This looks like something I've wanted for years, I'll install when I have
little more time to read and understand the instructions.(Just worked 18
hours straight)

The way hotkeys are handled currently in SolidWorks drives me crazy, AutoCad
10 was way better than the stupid system currently in SolidWorks. I did read
on this newsgroup that this will change for the better in SWX2007.

John Layne
www.solidengineering.co.nz

"Tin Man" <sendspam...@yahoo.com> wrote in message
news:1144208866.0...@e56g2000cwe.googlegroups.com...

Dale Dunn

unread,
Apr 5, 2006, 8:38:09 AM4/5/06
to
This sounds like something I thought about doing a while ago, but didn't
have the skill and determination. Thanks for making it happen. I'll try it
out soon.

Dale Dunn

unread,
Apr 5, 2006, 2:12:59 PM4/5/06
to
Ok, I've had a look. It's pretty slick. My only complaint is that there
will always be one key to launch it, and then the command alias. I'd be
fully converted if I could start a command alias any time. The first
keystroke would have to launch HotKeyCommander, which would then accept the
rest of the command alias.

Actually, I suppose I could implement this myself with 26 installations of
HotkeyCommander and corresponding launcher macros, each bound to a separate
hotkey. I wouldn't use them all, of course... Management wouldn't be too
bad. I'll have to fool around with that idea. I'll need a pile of tiny
macros for things like "edit feature".

Now for a real enhancement request: To help us learn/remember all the
command aliases, how about adding a list of available macros that shortens
as keystrokes are added? After HotkeyCommander is launched, and I press a
key, a list of all the macros whose aliases start with that key would be
listed, and again for the 2nd key, and so on until a complete alias is
specified. Listing the aliases with the macros in this list would help
tremendously with learning to use this, and remembering the less common
aliases.

Bo

unread,
Apr 5, 2006, 5:24:20 PM4/5/06
to
I would instantly look at Quickeys for Windows.

What is QuicKeys?
QuicKeys offers flexible, yet powerful tools that redefine the way you
use your PC. It takes the daily tasks that would normally require you
five...six...twenty or more steps and turns them into simple one step
shortcuts

www.quickeys.com

You can do so many repetitive things so much faster that it deserves a
good trial. Inexpensive piece of really time saving software.

Bo

Tin Man

unread,
Apr 5, 2006, 7:42:54 PM4/5/06
to
>>>My only complaint is that there will always be one key to launch it, and then the command alias.<<<

Yes, that is a limitation. Plus you have to hit [Enter] to run the
macro that you just key'd in. I find that mapping the [SpaceBar] to
call the HotkeyCommander macro does make this limitation A LOT easier
to live with.

>>>I'd be fully converted if I could start a command alias any time. The first keystroke would have to launch HotKeyCommander, which would then accept the rest of the command alias. Actually, I suppose I could implement this myself with 26 installations of HotkeyCommander and corresponding launcher macros, each bound to a separate hotkey. I wouldn't use them all, of course... Management wouldn't be too bad. I'll have to fool around with that idea. I'll need a pile of tiny macros for things like "edit feature".<<<

That was best I came up with to solve that too...way too much
maintenance. I had kicked around the idea of "S" calling all Sketch
macros, "P" for Part file macros, but again a lot more maintenance.
Plus what to do if a macro will work for multiple file types, like the
UnitsToggle.

>>>Now for a real enhancement request: To help us learn/remember all the command aliases, how about adding a list of available macros that shortens as keystrokes are added? After HotkeyCommander is launched, and I press a key, a list of all the macros whose aliases start with that key would be listed, and again for the 2nd key, and so on until a complete alias is specified. Listing the aliases with the macros in this list would help tremendously with learning to use this, and remembering the less common aliases.<<<

That sounds like a huge undertaking...but I'll put it on my list of
possibilities. For now you could print off a hardcopy of the list in
the Excel file for reference or use the "graphical" interface at the
bottom, "Expanded", section for awhile.

Talk to you later,
Ken

panliang9

unread,
Sep 30, 2022, 2:34:53 AM9/30/22
to
It is exactly what I need ,but unfortunately ,the soft (HotkeyCommander.zip)no longer exist in the web ,could sbd send a copy to me , 22594...@qq.com thanks a lot

--
For full context, visit https://www.polytechforum.com/solidworks/how-to-assign-multi-key-hotkeys-in-sw-and-more-44443-.htm

0 new messages