Is there any way to make the spacebar a hotkey for the OK function. For example when trying to add any feature, an extrude for example, you enter all of the contraints in the property manager then have to click on the checkmark to accept everything. I want to be able to use the spacebar to click any checkmark that I would usually click with the mouse.
I've tried customizing the hotkeys but don't seem to see an option to add a hotkey for this. Any suggestions?
SolidworksGeneral
Not that I know of.
However, especially in 2010, pay attention to the RMB cursor icon as they had a project where they tried to do a better job of having the RMB either be the OK, or advance you to the next input box. In that case it will be a blue icon instead of a green check.
WT
I would like to know this too, or what would the macro be to do this? I can hot key the macro if I had it. Enter is on the opposite side of the keyboard as the rest of my hot keys, its very annoying
Can you not program a mouse key to do that?
-or-
My mouse is right beside the keyboard number pad ... all I have to do is flick out my thimb to hit the Enter key.
Well unless my Thumb grows up 12" it wont reach my enter key, and no I do not have a mouse button to program enter too, even if I did I still rather hot key it with my left hand it should be a simple process implimented. The space bar would be perfect to use this with
Golly gee, fellers. Here is the macro.
Sub main()
Application.SldWorks.ActiveDoc.Extension.RunCommand -2, ""
End Sub
You don't even need the macro. Just reassign the "refresh" key to spacebar. (I think. I can't speak for every instance where there is a checkmark, as I have not tested this)
I was trying to find a way to do this today and came across this thread. The macro works if I run it in the VBA interface but it doesnt run when I assign it to a shortcut key.
Any ideas?
How about using the Enter Key on the number pad area of your keyboard? That's what I did when I didn't have a mouse with a gazillion buttons, I didn't have to get my hand of the mouse.
I dont see a "refresh" command.
That works. Would like a different button though.
For a hotkey to be able to run a macro, that macro needs to be in a folder called Macros under the SW install. Like this: C:\Program Files\SolidWorks2011\SolidWorks\Macros
WT
I dont have a macros folder or SolidWorks folder under
C:\Program Files\SolidWorks 20xx
I did create a macro under
C:\Program Files\SOLIDWORKS 2009\Macros\Ok.swp
Hotkey is the spacebar, but it doesnt work.
Does the macro work if you run it from the Run button on the Macro toolbar? When you say it doesn't work, are you saying that the macro runs but gives the wrong results, or are you saying that the macro does not run at all when you hit the hotkey? How about posting it here and I will also try it.
WT
Macro works fine if I run it in the VBA window. I used the code Josh posted earlier.
I also have other macros assigned to keyboard shortcuts that work just fine. These macros are on a network drive, not in my C:\Program Files....
How do you assign keyboard hotkeys to them - the only ones that show up in the Customize list are the ones in the Macros folder?
WT
Right-click the macro button and assign the hotkey at the bottom (shortcut)
Ahh, I see. I believe then to use that method you would need to create a button on the Macro toolbar for that OK macro and then assign the hotkey there, which is what you did.
The method I tried, and it worked here, is to put the OK macro in the Macros folder as described above, and then in the Customize Keyboard dialog, assign the spacebar to that macro. When I did, it properly notified me that the spacebar was already assigned to the View Orientation command - would I like to change it? I said yes for the exercise of it.
Now, that being said, I wonder if that default assignment is conflicting with your "external" assignment of the spacebar - they would need to execute in the same context. That might be why your other macros tied to hotkeys worked with your method - no context conflicts. Try my method and see if it works for you.
WT
hmm, that worked....lol
Im confused on why the method I use on the other macros doesnt work for this particular one... BTW, I did get the popup stating the spacebar was assigned to another command using my method.
I still suspect it's a conflict with the other spacebar assignment - same context, so which one gets executed?
WT