Extensible CAD Technologies
SolidWorks and PDMWorks Enterprise Development Blog

Free SolidWorks Add-In To Remind You To Eat Your Custom Properties

Posted by at 23 February, 2008, 10:50 pm

 In spite of all their positive benefits, which are many, more than a few SolidWorks users look upon custom properties with the same disdain that a pre-schooler would have for green leafy vegetables.  You can explain the benefits of custom properties, how they help you find things, how they lead to healthy drawing title blocks, how they improve PDM implementations, etc… until you are blue in the face and with some individuals you still won’t make a dent.  There might be a change for a few days even a few weeks but inevitably you are back to files with no custom properties filled out. 

In order to increase the life-expectancy of CAD administrators everywhere, I have posted a free .NET Add-In for SolidWorks that will “remind” your users to enter certain custom properties whenever they create a new file or save an existing one (after the initial save).  The list of custom properties is configurable and

 

the user cannot proceed with their file until they enter the custom properties.  I am sure the program can be improved upon but for those without SolidWorks API skills of their own this should be a nice little app.  Also, for those who do have SolidWorks API skills using Visual Basic.NET, I am more than happy to share the code if you request it.

 The Add-In, called “Big Brother” is written for SolidWorks 2008 and targets the 2.0 .NET Framework, which means if you have SolidWorks 2008 installed on your machine then you can use it.

 To get started,

1.  Download the installer package for Big Brother from here.

2.  Run the installer, agreeing to the overly wordy license agreement on the way.

SolidWorks API Add-In Written In Visual Basic.NET

3.  After installing the software, run the “Register Big Brother.bat” file in the installation directory.  Running this batch file will register Big Brother with COM and add the appropriate registry entries for SolidWorks to load Big Brother when SolidWorks is run.

.NET Add-In for SolidWorks 2008 Using The SolidWorks API

4. This is an optional step but if you don’t already have a decent XML editor, then I recommend you download XML Notepad which is a free XML editor from Microsoft.

Download Microsoft XML Notepad

5.  Use XML Notepad to edit the XML configuration files in the installation directory.  The installation has three XML files which are used to configure which custom properties are managed by Big Brother for each of the three main part types in SolidWorks.

  • AssemblyPropertiesToManage.XML – Represents custom properties for assemblies.
  • DrawingPropertiesToManage.XML – Represents custom properties for drawings.
  • PartPropertiesToManage.XML – Represents custom properties for parts.

XML Configuration Files For SolidWorks Add-In Written In Visual Basic.NET

Edit the list of custom properties to manage for each document type using XML Notepad.  Each “ExtProperty” node represents a custom property.  PropName represents the name of the custom property to be managed.  PropValue and PropType should not be touched.  Leave those alone.  Save the file(s) when finished.

6.  Open SolidWorks and create a new part.  After selecting your template, you should be prompted to verify or fill in the values for the custom properties in your PartPropertiesToManage.XML file.  The same thing should happen for subsequent file saves.  The original Save (for new documents) doessnot trigger the FileSaveNotify event.  I suspect that it is triggered by the FileSaveAsNotify event.  If anyone tries that and gets the answer then please let me know.

SolidWorks API Add-In Written For .NET 2.0 Using Visual Basic

7.   Additional configuration of the Add-In may be performed by editing the “ExtensibleEventManager.dll.config” file, which you should also use XML Notepad to edit. 

  • If BigBrotherMode=True then it is mandatory that users enter values for all custom properties.  If BigBrotherMode=False then the dialog pops up as an FYI.
  • If CatchFileNewEvent=True then files are managed on FileNew in addition to FileSave.
If you enjoyed this post, make sure you subscribe to my RSS feed!
Category : .NET | CAD | COM | SolidWorks | SolidWorks API | XML

14 Responses to “Free SolidWorks Add-In To Remind You To Eat Your Custom Properties”


Marquis Leblanc February 26, 2008

At first view , your “Big brother” API
sounds very good…
…and it’s exactly what i’m working on for
almost 3 weeks now, but for SW2007 sp4…

..and i’d really appreciate if you’d be king enough
to share your code with me , so i could complete
mine… and then after debuging and some improvement,
i could share mine…

Chris Dubea February 28, 2008

Hey there,

I’ve got a beta release of XMLPropWorks available for download on my site at http://www.dubea.org/XMLPropWorks. It’s a completely user definable custom property app which is driven by XML.

It’s an old school VB application, but it works. As you can see from the page, I’m in the middle of a major feature enhancement based upon some beta testers. Don’t be afraid of this version as I’ve used in personally for at least a year and it works. The new version won’t break anything from this version.

Chris

Jeff February 28, 2008

Hi Chris,

I didn’t try it yet but from looking at the web page it looks real slick. It handles the property stuff of this post’s example and the autonumbers from my last post’s example plus a whole bunch of other stuff. Bravo.

Why haven’t you upgraded it to .NET though? You can get VB.NET Express for free and it is soooo much easier to use than VB6.

Thanks for posting the free tool!

Jeff

Paul Smith July 2, 2008

Has anyone tried on 64bit version of win xp running SW2008?

Jeff Cope July 2, 2008

Paul,

The application was compiled to run on 32bit or 64bit so it will work on either. It will run as a 32bit application on 64bit Windows under WOW.

Let me know if you have any trouble. You shouldn’t but let me know if you do.

Jeff

Drew Tillitt July 18, 2008

That looks really awesome. I would be VERY interested in the code, if you would share it. Thank you very much!

Drew

Jeff Cope July 18, 2008

Drew,

I sent a similar project to the email you registered with.

Good luck,
Jeff

Chris Dubea August 20, 2008

Jeff,

Can the VB2008 Express version create SolidWorks add-ins? I’ve seen conflicting information.

XMLPropWorks 1.0 is nearly ready for beta testing. I will be setting up a wiki collaboratory to help me manage the beta test process a little better than last time which was via e-mail.

The next MAJOR leap for this app is translation into VB.NET.

cheers

chris

Jeff Cope August 20, 2008

Chris,

A few things:

I haven’t tried it with SolidWorks but I have created other COM interop addins with the Express version so you should be able to. However, the SolidWorks Addin Template Wizard definitely isn’t supported by the Express edition so if you can create the Addin, then you would have to have someone send you a stubbed out addin and then fill in the gaps with your code.

Note: The Standard version supports the template and is $300. Not free but fairly reasonable.

Regards,
Jeff

Craig September 17, 2008

Can I switch this application to fill in the configuration specific properties, and if so how would I do that?

Jeff Cope September 20, 2008

Craig,

Can you tell me a little bit more about your use case?

Phil January 12, 2010

Your Big Brother looks great. I would like to modify it bit to my exact needs.

Could I get a copy of the source code please.

Thanks,
Phil

Gurkan Durukal April 22, 2011

Hi Jeff,
Does it work with SW 2011 x64? (I don’t think so)
By the way, I need a batch editor for my hundreds of parts, assemblies and drawings custom properties works like find and replace w/o opening SW. Do you know an editor like this?
Thanks,
Bye,

Erik Larsen April 26, 2011

This addin is very close to what I need. Can I get a copy of your source code?

What I would like to implement is a form that presents a list box for some of the custom properies, then default to the last selected in most cases.

Thanks,
Erik



Generate First-Article Inspection Reports From TIF, PDF and CAD Drawing Files With InspectionXpert. Generate First-Article Inspection Reports From SolidWorks Drawing Files With InspectionXpert.