Wait, is that a classification or a PDM folder?

When folder names become the class of a file and the class is the folder, you get self maintaining classifications in PDM.

Classifying items within a PDM system can be a daunting task, involving decisions about class names, file placement, and classification list maintenance. These challenges can quickly accumulate for PDM administrators. In this article, we'll delve into an innovative approach that utilizes PDM tools to construct a self-maintaining CAD library classification system.

We will start with a folder scheme at the top level of a mechanical parts library. It is worth mentioning here that the folder structure you see here is for the most part a direct mimicking of the McMaster-Carr© website categories.

Showing the first level of a CAD mechanical library

This first level of folders gives way to lower level folders that further “classify” the items.

Second tier of folders, these are under the Fastening & Joining directory.

So now the trick is to tie these folder names to variables in PDM. Take a look at the data card for these COTS files.

Illustrating the Category and Sub-Category fields on the data card

We can use card PDM Card Lists to make this happen. The images below show the data card lists and their connection to the variables behind them.

Here are two of the SQL calls to get the folders the first displays all the directories at the top level of the library, the second looks at the directories contained within Fasteners & Joining. There are many like this in this example, but all are the same with just a different path for each location.

Select ''UNION
Select UPPER (P.Name) From Projects P, ProjectTree Pt, Projects P2
where P.ProjectID > 1 And
P2.Path Like '%\COTS\MECHANICAL\' And --EDIT THIS LINE FOR THE PROPER FOLDER TO QUERY DOWN FROM
P2.ProjectID = Pt.ProjectID And
P.ProjectID = Pt.ChildProject and P.Deleted = 0

-- THIS QUERY FINDS THE FOLDERS BENEATH THE FASTENING & JOINING DIRECTORY

Select ''UNION
Select UPPER (P.Name) From Projects P, ProjectTree Pt, Projects P2
where P.ProjectID > 1 And
P2.Path Like '%\MECHANICAL\Fastening & Joining\' And --EDIT THIS LINE FOR THE PROPER FOLDER TO QUERY DOWN FROM
P2.ProjectID = Pt.ProjectID And
P.ProjectID = Pt.ChildProject and P.Deleted = 0

Take note of the 'Category' and 'Sub-Category' fields on the data card. These values correspond to the folder names where the data is stored. By employing SQL to query the PDM database's 'Projects' table, this list becomes dynamic. Should the administrator determine the necessity for a new category or sub-category, creating a new folder suffices. SQL will seamlessly incorporate this change, ensuring the list remains up to date. In this setup, folders act as classes, and classes are represented by folders!

Now that we have a data card with selected Category and Sub-Category we can employ a Dispatch routine to move these files to their final folder location. Drop us a line to learn how this can be done or how to get SQL to dynamically update lists.

Previous
Previous

Writing to an Office file during a PDM Transition

Next
Next

Decoupled Part Numbers!