Blog

Google Integration with SolidWorks EPDM

This past summer a Google project was released on Google Code called GoogleCL (AKA Google command line), bringing access to some of Google's services to the command line. You may ask yourself, "Why would I want to use a command line interface when I have a WYSIWYG web UI in my browser?". Well we humans like nice UIs but automation systems lend themselves nicely to command line interfaces since options and other settings can be built up with scripts.  GoogleCL essentially brings a handful of Google's services to be used easily with any command line script.

Enter PDM

SolidWorks Enterprise PDM has many front-facing features to document management, however EPDM also provides a number of  "behind the scenes" options to automate actions internally and externally to the EPDM ecosystem.  Various automation can be delivered with programming (Addins), a script building GUI (Dispatch), as well as the out-of-the-box workflow transition actions.

Since I live in Google services professionally (Google Apps) and personally (GMail/Docs/Calendar), anything I can do to integrate these tools into SolidWorks peaks my interest. Google CL (Command Line) currently offers access to the following services:

  • Blogger
  • Calendar
  • Docs
  • Picassa
  • YouTube

For integration purposes I choose Google's Calendar and Docs services since they tend to be common places for design teams to create and sync their design efforts within Google's habitat. How to do it? On Windows it is actually pretty easy since it is all contained in the zip and nothing needs to be built.

 Setup

  1. Download GoogleCL (make sure to select either the 32 or 64 bit build)
  2. Unzip the download to a folder and run Google.exe
  3. Run a simple test for both Calendar and Docs to generate your user Auth Token. (These are stored in your user directory under a folder called ".googlecl".
  4.  

    Calendar: calendar add "Test Appointment Today"

    Docs: docs upload c:\test.txt

    Note: Both of the above scripts are run in the google prompt and will launch a web page allowing you to login in and grant access to Google CL.

  5. In the Enterprise PDM Administration tool, log into the vault, edit the workflow and display the properties of the transition where the new Google action will be added.
  6. Add a new Action using the type "Execute Command"
  7. Enter command to execute:
  8. For a Calendar event: C:\URL_to_googlecl_folder\google.exe calendar add "Review of [Filename] Tomorrow"

    For a Doc Upload: C:\URL_to_googlecl_folder\google.exe docs upload [FilePath] --folder "folder_in_Google_Docs" --no-convert

    Note: Both scripts can use the ">" button to add specifics about the file being transitioned such as the filename or file full path. 

There are still a few things to keep in mind when using Google CL when using it with EPDM.

  • Every client must have Google CL installed in the same location so the EPDM action can launch the script.
  • All clients will need to authenticate with their Google Accounts in order to create the Auth Tokens before using their accounts with EPDM.
  • The ability to upload any file, a recent addition to Google Docs, with the script option "--no-convert" only works with Premier Google Accounts, otherwise the upload will automatically be converted.
  • It doesn't seem to be straight forward to use it with Google Apps for Domains but I am continuing to figure out an easy way to do this and will post an update when I get it figured out.

Conclusions?

With Google becoming a more common backbone among some companies, GoogleCL is a good start to bring some automation and easy integration to engineering tools like SolidWorks Enterprise PDM. For those that want to get deeper, Google's services do have a full API and can be written to but these script tools make it simple to get the ball rolling.

If you have tried GoogleCL and have interesting way of utilizing these tools, please leave a comment.  I am interested in other use cases to try out as well!~Lou