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

February 23, 2008

 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!

Comments

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

  1. Marquis Leblanc on February 26th, 2008 9:44 pm

    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…

  2. Chris Dubea on February 28th, 2008 10:06 am

    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

  3. Jeff on February 28th, 2008 4:02 pm

    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

  4. Paul Smith on July 2nd, 2008 8:37 pm

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

  5. Jeff Cope on July 2nd, 2008 8:56 pm

    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

  6. Drew Tillitt on July 18th, 2008 10:05 am

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

    Drew

  7. Jeff Cope on July 18th, 2008 11:28 am

    Drew,

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

    Good luck,
    Jeff

  8. Chris Dubea on August 20th, 2008 11:01 am

    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

  9. Jeff Cope on August 20th, 2008 11:24 am

    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

  10. Craig on September 17th, 2008 11:22 am

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

  11. Jeff Cope on September 20th, 2008 11:57 am

    Craig,

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

Got something to say?