Preventing Improper Clearing
Oftentimes, SOLIDWORKS PDM vaults are not designed to handle clearing of metadata for new files that have been copied from either a SOLIDWORKS Save As or PDM Copy Tree operation. If workflow logic is implemented with variables that are mapped to file custom properties, and these variable values are not cleared properly, improper workflow logic with the new file(s) can result. This could lead to the newly copied files requiring manual fixing in custom properties if the metadata fields are read-only on the data cards and files, having metadata logic that will not satisfy workflow logic meant only for newly created files.
A sample SOLIDWORKS PDM Standard workflow and data card will be used to illustrate issues that can occur and what can be modified to optimize a vault for any file copy scenario.
See below for workflow example:
See below for data card example. All variables are mapped to SOLIDWORKS custom properties:
When a new file is created, the initial checkbox is checked, and the revised checkbox is unchecked. Checked assumes a value equal to 1 and unchecked a value equal to 0. The “To Initial WIP” transition has a condition where the file must have the initial checkbox equal to 1 across all configurations to satisfy transition.
Similarly, the “To Initial Release” transition has a condition where the file must have the revised checkbox equal to 0 to satisfy transition.
Assume a file that has already been released:
The checkbox for initial is unchecked since the “To Initial Release” transition unchecks the box as the file is released to production. The transition also sets and stamps the initial revision to A.
When performing a Save As in SOLIDWORKS, the metadata is retained assuming there are no default overwrites in place for any fields:
Once the file is saved, checked in, and attempting to change state to “Initial WIP,” the file will fail to transition.
This will cause the user to either modify the custom properties of the file, which is not a recommended practice, or the PDM administrator to add another transition from “Initialized” to “Initial WIP” to satisfy the condition:
What’s also incorrect is the revision level and part number as shown above
Default overwrites for the checkboxes and part number field can be used so when a Save As in SOLIDWORKS is performed, the default values are reset and not carried over:
Here are the results when a released file is copied with a Save As in SOLIDWORKS:
There’s still a problem with the revision still showing up as A. “Default overwrites” will not clear the revision since there was no default value associated with it. Default value for part number is a special value with “file name without extension.” The file will still transition OK to released since the Initial and Revised checkboxes are of the correct value.
A transition action in the “To Initial WIP” transition can be used to clear or set the revision variable to null when the file is transition from “Initialized” to “Initial WIP”:
If it is desired to clear the revision not through a transition action but when the file is added to the vault, Copy Tree can be used instead of performing Save As from within SOLIDWORKS:
Existing vault files can still be copied successfully, with the above vault changes, through Save As in SOLIDWORKS or PDM Copy Tree, it is just a matter of when the revision variable clears depending on the method being used. The vault is now optimized for proper clearing of metadata to satisfy the given workflow conditions and is independent of whether Save As in SOLIDWORKS or PDM Copy Tree is used.
When SOLIDWORKS PDM is first implemented, oftentimes the question comes up of using Save As from SOLIDWORKS, Copy Tree from PDM, or both for copying files. If it’s desired to have old variable values be cleared when the copied file is added to the vault, use Copy Tree since it’ll clear metadata before check-in. In the case of PDM Standard vaults, Copy Tree is more desirable since automatic transitions are not available with PDM Standard. Any variable clearing without special values and default overwrites would occur during a manual change state if Copy Tree is not going to be used to clear old metadata.
If it’s desired to have an automatic transition, in the case of PDM Professional, to clear old variable values during a check-in, Save As and/or Copy Tree can be used, the only difference being Copy Tree would not be setup to clear old variable values.
The plus sides of Copy Tree within SOLIDWORKS PDM over using Save As in SOLIDWORKS is an interactive dialog to show the exact paths the files are being copied and/or named, serial number regeneration in PDM Professional, and automatic check-in after copy:
As demonstrated, vaults can be setup to result in the same metadata clearing behavior whether Save As or Copy Tree is used, but it’s best advised to setup the vault a certain way and train users an exact procedure to copy files to ensure proper metadata clearing is consistent across the board.
This blog is authored by Max Kent. As a PDM Applications Engineer, Max focuses on SOLIDWORKS PDM services such as replication in archives and databases; software upgrades; troubleshooting and technical support; and much more. He graduated with a bachelor’s in Mechanical Engineering.