Assigning shortcut to macro
Assigning shortcut to macro
(OP)
Hi All,
If someone has located their macros on a network drive (and flagged this in the appropriate SW settings) is it possible to assign a keyboard shortcut to the individual macros using the customize dialog? It isn't obvious to me that I can drill down any further to get at the individual macro files.
I would appreciate any feedback.
Thanks,
If someone has located their macros on a network drive (and flagged this in the appropriate SW settings) is it possible to assign a keyboard shortcut to the individual macros using the customize dialog? It isn't obvious to me that I can drill down any further to get at the individual macro files.
I would appreciate any feedback.
Thanks,
Chris Gervais
Application Engineer
CSWP, CSWST






RE: Assigning shortcut to macro
Flores
SW06 SP4.1
RE: Assigning shortcut to macro
The only macros that will show up available at Tools\Customize\Keyboard\ will be macros located in your <sw install dir>\macros.
The method described above by smcadman is the only way I know to accomplish what you want with the native SW stuff.
Ken
RE: Assigning shortcut to macro
Best regards,
Chris Gervais
Application Engineer
CSWP, CSWST
RE: Assigning shortcut to macro
This allows me to edit the standard macros without having to redistribute them, while giving the users freedom to set up whatever they need to for themselves.
Something basic like this works:
'Run Macro
Option Explicit
Public swApp As Object
Dim retval As Boolean
Dim boolstatus As Boolean
Sub main()
Set swApp = Application.SldWorks
Dim filename As String
filename = "R:\SolidWorks Applications\CephSetTextboxWidth.swp"
boolstatus = swApp.RunMacro(filename, "SetTextboxWidth1", "main")
End Sub