How to Make Code-Free Reports
SOLIDWORKS PDM offers the capability of generating reports from an SQL query. This can be a powerful tool, but it does require a working knowledge of SQL, which many people may not possess.
For those who are not familiar with SQL queries or how to use those queries to generate a PDM report, we will look at tools in product data management(PDM) that can be used to generate a similar output.
BOMs in SOLIDWORKS PDM
In the SOLIDWORKS PDM local vault view, there are number of bills of materials (BOMs) that can be used to report information about a top-level document such as an assembly or drawing. The BOMs that are available are the CAD BOM, the named BOM and the computed BOM.
When viewing an assembly or a drawing in the SOLIDWORKS PDM Local Vault View, you can access the computed BOM. The computed BOM lists all the components contained within the assembly or drawing. This BOM is calculated each time the drawing or assembly is viewed.
BOM tab in local vault view.
The information contained in a computed BOM can be saved as a comma-separated file (CSV) or a named BOM.
Saving computed BOM.
The CSV file can be opened in programs such as Microsoft Excel and can be used to report information about the components contained within a drawing or assembly. The information that is reported can be controlled by defining the contents of a BOM through SOLIDWORKS PDM Admin.
Some columns of the computed BOM can be edited, but the assembly or drawing must first be checked out. These fields include quantities, description and the revision.
Modifications to components.
Modified fields are highlighted, and the legend at the bottom right helps us understand what changes have been made. These changes only apply to the BOM. The CAD files are not changed nor is the metadata associated with the CAD files. To undo these changes to the BOM, simply delete the modified field.
There are limitations to a computed BOM. Columns and rows cannot be manually added or deleted, and there is no physical computed BOM that can be checked into a workflow. Since a computed BOM cannot added to a workflow, changes to a BOM cannot be tracked or controlled.
The Exported BOM (CSV)
There are two ways of creating an external BOM that we will look at in this article. One is a named BOM and the other is saving the file as a CSV file.
An alternative to saving the BOM as a CSV file is to open the BOM directly in the default program that has been associated with this file type — for example, Excel or Apache.
Opening BOM as a CSV file.
Once opened, the BOM can be formatted and saved. Since this is a physical file, it can be checked in and controlled by a workflow.
If a SOLIDWORKS BOM is included in a drawing or assembly, this BOM can be displayed in the PDM local vault view.
Like the computed BOM, the CAD BOM can be saved as a CSV file or opened directly in our CSV application. The CAD BOM cannot be modified in the PDM local vault view, but it can be modified from within the drawing or assembly.
The Named BOM
A computed BOM or a SOLIDWORKS BOM can be saved as a named BOM. A named BOM is a snapshot of the computed BOM or SOLIDWORKS BOM that can be controlled by a workflow. The named BOM is created within PDM and does not require any third-party application.
To create a named BOM, select the computed BOM or a SOLIDWORKS BOM and then select the BOM option from the Save As dialogue box.
Save BOM options.
Once the named BOM has been created, it can be modified by right clicking on the BOM. Rows and columns can be inserted.
Inserting a row in the BOM.
Deleting a row.
Inserted rows and columns can be deleted.
Rows and columns can be hidden or shown.
And all cells within a named BOM can be manually edited.
Editing the contents of a BOM cell.
After modifying the BOM, selecting Save will create a new named BOM or overwrite the existing named BOM. Save As will create a new copy of the named BOM.
Multiple saved copies of a BOM.
Once we have created a named BOM, it can be checked in.
Checking in a named BOM.
When changes need to be made to the named BOM, it can be checked out.
As the named BOM is checked in, new versions of the BOM are created. These versions can be accessed from the BOM tab.
The local vault view can be displayed in three separate ways. The default display is the Show Files display, but two other displays — Show Search Results and Show Bills of Materials — are also available.
While the display is set to Show Bills of Materials, the state of the BOM can be changed.
Changing state of a named BOM.
Also, the BOM can be renamed and the history of the BOM can viewed.
Named BOM scan be filtered to control what is displayed. This can be done in both the Show Files and Show Bills of Materials displays.
Here’s one final note on named BOMs. The workflow that the BOM resides in is controlled through the Workflow Properties menu.
Using Searches to Create a Report
An alternative to using PDM BOMs to generate reports is to use searches to gather the required information. A search consists of two components, the search card and the column set. The search card is used to provide a PDM user with the search criteria. The search card also identifies which column set is to be used.
The column set is used to control how data is displayed. There are two types of column sets: one for the file list and the other for search results.
During the creation of the column set, we define what information we want to see in our search results. The displayed information is based on variables, so we may need to first define the required variables in PDM Admin.
Once we create a search column set, it can be launched from the local vault view. There is also a dedicated search tool, which offers additional functionality.
Accessing the search tool.
The search tool opens in its own Window and offers the ability to save the search results.
Like a BOM, the search results can be saved as a CSV file.
Although the process of creating reports using the method outlined in this article requires some manual work, these reports can convey the same information as those generated through SQL.
Joe Medeiros is a senior applications engineer at Javelin Technologies, a SOLIDWORKS reseller servicing customers throughout Canada. He has been involved with SOLIDWORKS since 1996. An award-winning blogger, he regularly writes about SOLIDWORKS products.