Any SolidWorks PDM user knows that managing a vast library of CAD files can be a challenge. The SolidWorks PDM (Product Data Management) system offers a powerful solution for organizing, securing, and accessing CAD data. However, what happens when you need to update every file in your SolidWorks PDM vault with specific changes, like custom properties, mass units, and material settings? This is where the real challenges begin.
We recently had the opportunity to work with a client facing just such a predicament. After switching to PDM, they discovered their files were missing key data to enable their business to function. The task: copy custom properties to the โDefaultโ configuration, set mass units to kilograms, and update the material based on a lookup table; for every file in the vault. Tens of thousands of files. A daunting task, but just the challenge we at CAD Innovations love to work with our clients to solve.
Initial Attempts with #TASK and Batch+
To kick things off, we decided to try #TASK, a popular utility for automating tasks in SolidWorks. Unfortunately, #TASK didnโt quite cut it for our needs, especially when it came to setting materials. We encountered a roadblock when trying to utilize the SolidWorks APIโs IPartDoc.SetMaterialPropertyName2 method. #TASK simply couldnโt provide the functionality required for this particular task.
Next, we turned to Batch+, a great free tool for batch processing SolidWorks files, including execution of custom macros. Although it currently lacks PDM integration, it was very reliable and, in combination with #TASK (for itโs bulk check-out capabilities), enable us to set materials as needed (with โSafe Modeโ disabled).
Unexpected Challenges and Setbacks
After processing nearly all the SLDPRT files in the vault, our client discovered an additional condition for the material lookup table, based on a PDM data card property. This unexpected twist complicated the project further.
To make matters worse, Batch+ threw us a curveball by scattering a vast number of local files throughout the vault. These files seemed to appear out of thin air when we attempted to click-drag from a PDM search into the Batch+ interface. It was a mess that we needed to clean up.
Regrettably, attempting to tidy things up manually proved futile. We realized that our best course of action was to resort to a full backup restoration of the virtual machine where the PDM system resided. This came with its own set of challenges, including some licensing hiccups, but with the help of our clientโs VAR, we were back up and running in no time.
Strategy Change: A Custom PDM Add-In
After the setbacks we faced, it became evident that a custom solution was the only way forward. We decided to build a PDM add-in from the ground up. The add-in was designed to traverse the PDM folder structure, read the data card properties, and apply the material when new conditions were met, including the additional material lookup table requirement.
For processing assemblies in the vault, our custom application remained the go-to tool. It offered a level of control over every aspect of the process, such as opening silently, handling lightweight components, and more. We were able to update assemblies efficiently, ensuring that the changes were applied accurately across the entire project.
Conclusion: Persistence Pays Off
Our journey to update every file in our clientโs SolidWorks PDM vault had its share of twists and turns. We faced initial setbacks with off-the-shelf solutions like #TASK and Batch+, dealt with unexpected complications, and navigated through the chaos that ensued with the local file issue. However, by opting for a fully custom solution, we were able to meet our clientโs requirements and overcome the challenges that came our way.
The experience highlighted the importance of persistence and adaptability in the world of engineering and design. Sometimes, when youโre faced with complex and unique challenges, a custom solution is the best way to achieve your goals and provide the value your clients deserve. In the end, our commitment to solving problems paid off, and we were able to deliver the results our client needed.
If you havenโt checked out our SolidWorks drawing notes add-in Versa Note, now is the time; download and start your free trial today!