CADSharp is pleased to present a new free tool called Command Blocker that blocks specific commands from running in SOLIDWORKS. Optionally, you can also run a macro in lieu of the default behavior, effectively overriding the command with your own custom functionality. This tool might be used by both users and CAD admins to prevent intentionally or accidentally using certain commands:

<> Custom property dialog

<> Addin dialog

<> Copy to Adobe Illustrator

<> Edit title block

As demonstrated in the video above, this is made possible by listening for the values of commands and then entering them in a settings dialog. This means that any command in SOLIDWORKS can be blocked — use with caution!

Download

Download the Command Blocker installer here.

How It Works

The secret sauce to this addin isn’t a secret for anyone who has taken one of CADSharp’s Advanced Program Development Using .NET training course. If you haven’t taken that class, I’ll still let you in on the secret: CommandOpenPreNotify event. By listening for this event, you can cancel the default the behavior and replace it with your own. You can see a open source example of such a listener here. The class containing the event listener is shown below:

The Next Level

If you can envision this tool being useful for your organization in some modified form then please reach out to us to discuss your needs. For example, if this were to be used by a CAD administrator then additional features might include:

1. Preventing users from accessing the Settings dialog

2. Allowing the Settings dialog to import blocked commands from a list kept on a server.

Reach out to us if you’re ready to take Command Blocker to the next level. Until then, thanks for checking out this tool and don’t forget to sign up for our newsletter below so you can learn about more products like this.