Block Commands With the SOLIDWORKS API

Blog 3.2.2020 No Comments

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 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.

Leave Comment

Upcoming API Training Class Near Portland

Blog 2.1.2020 No Comments

CADSharp is offering a four-day live training class in Vancouver, WA, USA on April 27 – 30 on SolidWorks addin and stand-alone development using Visual Studio and VB.NET. Here’s what others have said about our classes:

You’re the best programming teacher I’ve ever had. I took two programming classes in college and neither of the teachers broke the subject down and explained every line of code like you do.

Alex B.,

Why You Should Attend

<> Highly rated. The last 40 survey respondents averaged 8.4 / 10 for the question, “Were you satisfied with how much you learned?”

<> Beginner-friendly. No previous programming experience is required.

<> Personal. Small class size allows for excellent teacher-student interaction.

<> Professional. Content is designed and taught by Keith Rice, a leading SolidWorks API expert and software developer.

<> Flexible. Lessons are tailored on-the-fly to student needs and interests.

<> Learning doesn’t end. Complimentary one-year premium membership included.

Course Description

Download syllabus for Advanced Program Development

Ready to go to the next level? If you already have experience writing VBA macros for SolidWorks (prerequisites are stated in syllabus), then this course will cover all aspects of professional add-in and stand-alone development: program setup and architecture, object-oriented programming techniques, using Visual Studio, source code control and collaboration using GitHub, documentation, deployment, and administration. The contents of this course is borne out of years of real-world experience and has never been published in any form.


1500 USD per person

Date and Time

April 27 – 30. Training is from 8:30 AM to 4:30 PM with an hour break for lunch. Trainees may stay after the class to ask additional questions.


915 Broadway St, Vancouver, WA 98660 USA

Our training center is located just 10 minutes away from the Portland International Airport (PDX) with plenty of excellent hotels, eateries, and outdoor attractions in the area.

Registration and Payment

Registration is limited to six people. Email me to register.

I have one computer available for rent for 200 USD. First come, first serve. Otherwise, you will be expected to bring your own computer.

Invoices may be paid by check, wire transfer, or credit card. If by credit card, an additional 3% processing fee is included. Invoices will be sent out a week before the class starts.

I hope you can join me for a great time of learning! Let me know if you have ANY questions.


Want to keep up with future content and training events? Sign up for our newsletter.

Leave Comment

Download 3DExperience World Presentations

Blog 1.24.2020 No Comments

3DExperience World, formerly known as SOLIDWORKS World, has come and gone. We exhibited at booth 118 and had a fantastic time meeting hundreds of you from around the world. Keith Rice, our Technical Director, presented three times on SOLIDWORKS API topics. You can download the files for the presentations below:

<> Macros vs Addins vs Stand-Alones – [files][video]

<> SOLIDWORKS API for Total Beginners – [files][video]

<> Write A SOLIDWORKS Addin From Scratch – [files]

If you missed us and want to chat, please reach out to us.

See you next year in Nashville!

If you want to stay up with more great content, be sure to join our newsletter.

Leave Comment