Exporting BOM Data as XML from SOLIDWORKS Manage

Article by Bryce Hooper on Mar 14, 2024

SOLIDWORKS Manage provides greater flexibility than we’ve known with just PDM in terms of exporting data. We’ve previously covered exporting record item data, so now we’ll extend that by including BOM data.

What can we export?

When exporting BOM information, we’re limited to a number of fields for the child along with all properties from the parent. Additionally, we are given fields related to the child and its configuration in the BOM, such as quantity and item number.

Configuring the Export

Configuring the XML export for exporting BOM data starts as described in a previous article and then adds a few extra steps. First, we’ll specify the format for the BOM information itself.  

To do this, open the object’s administration dialog and go to the BOM configuration page. 

We'll select a BOM format that we’ve already defined to edit and use for export. 

On the Other Options tab in the BOM properties dialog, find the Export data templates button.

Export File Settings in SOLIDWORKS Manage

Export file settings are specific to the BOM configuration. If multiple formats are necessary, more BOM configurations will need to be created to suit. 

In the File Body area, we define our structure as we did in the Main Text area of the object’s export template. 

This structure does not need to be a full XML structure, as it will be repeated per BOM item inside the main template once fully configured. 

I’ve created this example as a sub-item structure for how I want my BOM to look as a multi-tiered output.  

Import Keyword Data in Add/Edit Export Values Dialog in SOLIDWORKS Manage

Input values work the same as defined in the article for exporting record data to XML; the key difference is the options of fields. 

Many of the fields are only able to be pulled from the parent and not the BOM item itself. There are also options for Quantity and Item number, which can only exist in a BOM. 

We define these one at a time by clicking the + icon. From here, we specify a keyword. 

There are no special requirements for keywords, but the idea is to make them unique enough that they won’t be in the body of the XML structure.  

In the image below, we have the description from the record being injected into the output file from the keyword ‘$Qty’.  

We added an extra character to ensure that the tag of ‘Quantity’ isn’t getting replaced with the values from the record.  

Repeat this process for every variable you’d like to see in the XML output, and include the keyword in the file body text.

Once the BOM export template is configured, it can be added to the object’s export template that we’ve previously defined. 

Export File Settings in SOLIDWORKS Manage

To make the template a BOM template, check the box for Export BOM.

This enables the keyword for the BOM field. This can be specified as something custom if necessary, but is BomKeyword by default.  

Add this to the main text as shown above.  

This will be replaced repeatedly for each item on the BOM. If we toggle the option to export BOM items in Tree style, then BOM items will come with their sub-components noted as a sub-item level with a #.# item number format.  

Using the Output children from all BOM levels option, you get this same effect, but item numbers for sub-items start at one for each new sub-assembly.

Exporting Record Data

Running an export that is configured for BOM data is the same as it is for records. To export, right-click a record and go to Tools Create XML file for ERP.  

Create XML File For ERP Option in SOLIDWORKS Manage

A dialog will pop up to select which XML template to use. Clicking Generate will process the export and create the file in your site’s output folder.

I hope you found this article demonstrating exporting BOM Data as XML from SOLIDWORKS Manage helpful. Check out more Manage articles below. Additionally, join the GoEngineer Community to participate in the conversation, create forum posts, and answer questions from other SOLIDWORKS users. 

Learn More About SOLIDWORKS Manage

Restoring SOLIDWORKS Manage from Backups

Backing Up SOLIDWORKS Manage

Upgrading SOLIDWORKS Manage

Creating Reports for Records in SOLIDWORKS Manage

SOLIDWORKS Manage: Linking External Data Sources and Importing

VIEW ALL SOLIDWORKS MANAGE ARTICLES

 

About Bryce Hooper

Bryce has been using SOLIDWORKS since 2008 in multiple roles across multiple industries from industrial vacuum to RV frame design. He spent many of those years spent as a PDM administrator, implementing 3 PDM vaults along the way. He earned his CSWP in 2019, followed by his CSWE in 2013. Programming is a passion that has followed Bryce through his various positions, writing custom business applications to improve design processes. In his spare time Bryce is a gamer, a maker, and a brewer.

View all posts by Bryce Hooper