Exporting a bill of materials from PDXpert to Visio

Last update 2017-12-20

This procedure requires a recent PDXpert release.

If you have PDXpert release 9.2 or earlier, you can manually create a Visio import file using some basic formulas and a few minutes of find/replace. See Creating a graphical bill of materials in Visio (older releases)

With PDXpert PLM software, you can create parts in multi-level structures. While most PLM software users will be quite comfortable navigating the multi-level structure within PDXpert, you may occasionally require a graphical means for showing the product. A picture may be useful during a major design review, or as a navigation reference for manufacturing, product service or customer support staff.

In a just few minutes, you can have a graphical view of your bill of material in Microsoft® Visio®. Although this app note uses Microsoft Visio 2010, the technique should also be applicable to later releases.

Bill of materials in Visio

Set up the BOM export format in PDXpert PLM software

We'll create a new member of the PDXpert Transforms collection (see the PDXpert client help guide: Contents > How to use the Collection Explorer > Adding a new collection member).

We'll only need to do this once, and then we can use our Transforms collection member any time we want to create the export file.

Download this file, which contains the transform that you'll need.

In the Collection Explorer:

  1. On the Transforms collection node, right-click to Add new member.

  2. Set the Name to Export Visio BOM.

  3. Open the Export-Visio-BOM.txt file in Windows Notepad (not in a word processing application). Copy the entire contents (Ctrl+A, Ctrl+C), and paste it (Ctrl+V) into the new member's XML textbox.

  4. Close or lock the window to save your changes.

After we have created the new Transforms collection member, we're ready to export the multi-level bill of materials.

Export a PDXpert PLM software bill of materials file

To export the Visio BOM file from PDXpert:

  • Open the Report/Export Wizard (Tools | Report/Export Wizard...).

  • Select the Export Visio BOM dataset, and click the Next button.
  • Drag a multi-level assembly from the Item Explorer onto the Report/Export Wizard, and click the Finish button.
  • In the Save As file dialog, enter a file name. On the Save as type: dropdown, select Text (tab delimited) (*.txt). Click the Save button.

Import the bill of materials file into Visio

Visio 2016 has a useful utility called the Organization Chart Wizard. It will import a list of relationships and automatically create a hierarchical organization tree, which looks pretty similar to what we'd want for our product tree.

The Organization Chart Wizard assumes that an employee can have only one manager, and automatically filters duplicate employee records. However, our product structure may contain a component that appears on multiple assemblies. So, the transform tricks the Organization Chart Wizard by assigning different "employee IDs" to the same part1 based on where it's used in the BOM.

In Microsoft Visio:

  1. Create a new Visio file using the Organization Chart template. Select the Organization Chart Wizard, which is easier to format than the other options.

    Creating a new drawing using the Organization Chart Wizard
  2. On the Wizard, select Information that's already stored in a file or database, and click the Next button.

    Selecting a file as the data source
  3. Select the import format as a text file.

    Selecting the file format as text or Excel
  4. Browse to find the bill of materials import (.txt) file.

    Locating the BOM import file
  5. Specify the file data that uniquely identifies your items within the product tree:

    • The Name: value as Id column.
    • The Reports to: value as Reports To column.
    • There's no First name: value.
    Defining the item identity columns
  6. Specify the displayed fields as the Item (part number) column and Name (part description) column.

    Defining the part number and name columns
  7. There are no shape data fields in the default transform, so click the Next button.

    Defining fields for Visio shape data
  8. Specify the layout options that you want Visio to apply. Click the Finish button.

    Choosing Visio's layout options

Final notes

You can use Visio's tools to arrange the objects, and to apply themes and other formatting as desired.

The transforma can be modified to suit your needs.

DECLARE @MaxLvl int = 4;      -- maximum number of levels displayed

DECLARE @NameLimit int = 35;  -- max length of part name to fit Visio box

If you have more than a few levels in your bill of materials, use the @MaxLevel value to set how "deep" you want to expand your product structure. To ensure that the item descriptions fit within the Visio boxes, the transform provides a @NameLimit value. Change the value to adjust the description maximum length.

Given display & printing size constraints, you may wish to omit some items. This can be done by editing the BOM export file in Windows Notepad or Notepad++2 before importing into Visio, or simply deleting objects after the import is finished. To apply a consistent filter, add a WHERE clause in the transform:

...

) MLBOM
WHERE Type = 'Assembly'
ORDER BY TreeId

PDXpert's transforms are extremely flexible. Other useful data can be exported from PDXpert, and imported into the Visio diagram.

Notes

  1. The Id and Reports To identify node positions (indent level + find) within the BOM graph. The values are arbitrary, and have no meaning outside of the current file.
  2. Excel is not a good editor for delimited text because it can misinterpret Unicode and extended ANSI characters, and convert text with leading zeroes into numeric values or dates.

This application note was relevant to the PDXpert software release that was current at time of publication. Product changes since that time may affect its utility. We'd be happy to assist you in assessing the applicability of this note to your situation.

Application Notes
Working within PDXpert
Working with other software applications