Exporting Record Data as XML from SOLIDWORKS Manage

Article by Bryce Hooper on Jun 21, 2022

SOLIDWORKS Manage gives us greater flexibility than we’ve known with just PDM in terms of exporting data. One place where this is visible is in the ability of Manage to export record data to XML. In this article, we explore exporting data from a single record as XML from SOLIDWORKS Manage.

What can we export?

SOLIDWORKS Manage has several options for what we can export to XML. Here we’re going to explore exporting metadata for a master record. If you’ve used the export function out of SOLIDWORKS PDM Professional, you know that we can really only get BOM information from PDM.  

In SOLIDWORKS Manage, we can control the structure and information presented in the XML output down to the names of the tags and the overall structure of the XML document.

Configuring the Export

Before we can export data, we have to configure our object settings

To do this, open up the administration for the necessary object. 

I’ll be using a PDM object for my example, but the settings will be located in similar locations for non-PDM objects.  

Exporting Record Data from SOLIDWORKS Manage

On the Options page of the administration dialog is a selection for Export data templates. This will bring up the template selection dialog. 

We can have as many templates as we need with different formats. 

Start by creating a new template with the ‘+’ button in the top right.  

Export File Settings Page in SOLIDWORKS Manage

Many of the options to configure here require that the template is named and saved first. As such, this is a good starting point. After, we can begin configuring our template.  

Above is a very simple template to export some basic information. 

The main text area is where the full format of the output file is created. Create your tag tree structure here using replacement words to fill in data from the record.  

There is no standard format required and is completely free form. I’ve created some tags that will help later if it's decided to make this into a BOM export.

Add/Export Values Page in SOLIDWORKS Manage

The inputs area focuses on our replacement values. 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 this image, I have the description from the record being injected into the output file from the keyword $Description. I added an extra character to ensure that my tag of Description isn’t getting replaced with the values from the record. If we have default values when no value is found, we can specify this here.  

For fields like description, we can go a little further to replace values inside of the referenced value. We may want to do this for values like ‘EACH’ becoming ‘EA’.  

Repeat this process for every variable you’d like to see in the XML output. Be certain to include the keyword in the main text.

Export File Method Page in SOLIDWORKS Manage

An output must be specified before the XML can be processed. Create a new output by clicking the ‘+’ icon. Specify a site as configured by Manage and a location. Manage must have permission to write to this folder. 

Each site may have its own output location.

Other options in the export file settings allow us to determine what the output will look like if we have multiple files selected and specify conditions for the XML to be generated. 

Output filename is controlled by a selection between Part Number, Part Number and Description, or GUID.

Exporting Record Data

Create XML File for ERP Option in SOLIDWORKS Manage

Once our settings are final and we’ve saved and closed the dialog, we are ready to export.

To export right-click a record and go to Tools > Create XML file for ERP.

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

More SOLIDWORKS Manage Tutorials

SOLIDWORKS Manage: Linking External Data Sources and Importing

Installing the SOLIDWORKS Manage PDM Add-in

Importing Files into SOLIDWORKS Manage from a Folder

SOLIDWORKS 2022 Data Management: PDM, Manage, & Admin

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