In SOLIDWORKS PDM, folders are used to group files in a meaningful way. For example, files unique to a project might be saved in a folder for that project. It might be useful to have the project the file belongs to as one of its properties. On a drawing, this property can be displayed on the face of the drawing.
It might be useful to have the Project name copied from the folder into the file property Project. This article will explain how to do this.
Note: To save modified data cards, the user must be logged into the vault view with an account that has the folder permission, Can update the design of cards
SOLIDWORKS PDM can be set up so that when a file is first placed into PDM, it copies information from the folder in which it is saved into the file properties.
This works great when creating new files, but what if a file was saved in the wrong folder? Or the project name changes? Is there a way to get the information from the folder to all files in the folder?
Yes, there is, and it builds on the configuration set up in the first method.
In this section, we will set up SOLIDWORKS PDM so new files added to a folder will get the Project Name copied into their properties.
The first step is to create a variable in the PDM Admin tool for Project Name. We will assign attributes to it. These attributes are the properties in the file that will contain the Project value.
In the PDM Admin tool, right-click on Variable and select New Variable.
In the Edit Variable dialog box, perform the following steps:
For the information to flow between the file and SOLIDWORKS PDM, the value must be in the file’s data card. For the information to flow from the folder to the file data card, the information must be in the folder’s data card.
Edit the card used for parts and assemblies. These can be different cards, but, in my vault, they both use the same card. You can tell which file a card uses by the path it is saved in and the file extensions next to the card name.
If there is no path, then the card is saved at the root of the vault. Data cards apply to the folder they are saved in and all subfolders – until another data card is encountered.
Right-click the card name and choose Open or double-click the name.
Refer to the screenshot below for the following:
In the PDM Administration tool, expand “Cards: Folder cards”. Select the folder data card that applies to the folder in which you will keep your files. In my case, I only use one folder card in my vault.
Double-click the folder card or right-click and choose Open to open the card in the Card Editor.
Add the variable to the folder card in the card editor.
Refer to the screenshot below for the following steps:
With the cards modified and saved, we are ready to work in the local vault view. In the view, go to the top-level folder to enter the value. In this case, we have project folders, so we will select the project folder and enter a value for the Project Name.
This file was added after the data card changes. Note that the Project Name was automatically copied to its data card.
In the file properties, we see the new variable has been added with the value entered in the folder.
Again, this is great for new files being added to the folder. But what about the files that are already in the folder before we made these changes?
We can propagate the value for this variable that was entered in the folder to any or all the files in the folder.
First, check out the files in the folder you want to update. Files must be checked out to make this change.
Right-click the folder that contains the files to update. Right-click the folder in the navigation pane of Explorer.
Look for the selection Update values in files…
The process starts with choosing which files to update. There are six (6) steps.
Step 1 allows you to choose files by words in the file name.
In our case, we will ignore this option.
Step 2 allows us to specify files in certain workflow states.
In our case, we determined which files to update based on which files we checked out. So, we will leave this at the default with all states selected.
Step 3 verifies which files will be updated. You can uncheck any files that you don’t want to update.
In our case, we will update all listed files. Select Next.
Step 4 allows us to choose which variables to copy into the files.
In our case, we only want to copy the Project Name, so we select that.
Step 5 allows us to choose which configurations to update. You can add any configurations you have that aren’t listed.
If one of the files being updated has been checked in with the configuration name, that name will be listed.
Step 6 is verification that the command is about to execute. Select Finish.
You will receive a message when the process is finished updating files.
Select a file to verify the folder value was copied to the files.
Files are ready to be checked in.
About Jim Ward
Jim Ward is a part of the GoEngineer SOLIDWORKS PDM Support team. He has a BSME from CSU, Chico. He worked in design for about 12 years then moved into a SOLIDWORKS support role. The last several years have been focused on SOLIDWORKS PDM Professional (formerly Enterprise PDM).
Get our wide array of technical resources delivered right to your inbox.
Unsubscribe at any time.