This website uses cookies to ensure you get the best experience on our website. By using our website you agree on the following Cookie Policy, Privacy Policy, and Terms Of Use
This VBA macro will listen for SOLIDWORKS commands (e.g. opening, rebuilding, suppressing, resolving etc.) using SOLIDWORKS API and identify the long running ones by matching the execution time to the user assigned delay period. If the command is running longer then this period, the beep signal is played notifying the user that the command is completed. If command is executed faster than no sound is played.
This can be useful when working with large models as it is possible to switch the screens or perform another activity while command is being executed and be notified once the operation is completed without the need to constantly monitor the progress.
Running instructions
Create new macro and add the following code
Const MIN_DELAY AsInteger = 5
Dim swCmdsListener As CommandsListener
Sub main()
Set swCmdsListener = New CommandsListener
swCmdsListener.MinimumDelay = MIN_DELAY
EndSub
Specify the command minimum delay in seconds by changing the value of MIN_DELAY constant
Create new class module and name it CommandsListener. Paste the following code into the class module: