SOLIDWORKS PDM Professional is filled with features to ease the burden of meticulous documentation and data entry. However, few tools are useful without proper understanding, configuration, and implementation. To that end, this article discusses the purpose, setup, and troubleshooting of XML import/export rules in PDM.
Before jumping into the subject, it is important to understand the ideas behind XML import/export. XML import and export rules in SOLIDWORKS PDM Professional are a feature designed to automate the transfer of data between the SOLIDWORKS PDM vault and external systems.
Export: As the name implies, Export rules are used to automatically generate XML files containing data, specifically Bills of Materials (BOMs), for use outside of your SOLIDWORKS PDM vault. These XML files can then be read by other systems, such as Enterprise Resource Planning (ERP) or Product Lifecycle Management (PLM) systems.
Import: Meanwhile, Import rules are used to import data, via variable values, to be associated with specific files within your SOLIDWORKS PDM vault from XML files.
Understandably, you may still be asking why this is useful. As mentioned above, manually “syncing” this data often comes down to manual data entry, which leads to human error in the data or bottlenecks in the import/export process. If we can’t get the two systems to work together directly via some kind of software connection, allowing the two systems to pass “notes” (XML files) is the next best option.
It’s easy to say, “You can use import and export rules to move XML data in and out of PDM”, but that doesn’t do much to provide a real idea of the benefit. To help with that, below are two of the most common scenarios we see with XML rules. We’ll revisit these scenarios as we go through the steps involved in setting them up.
After deciding how you’re going to use the XML import/export rules, the next question becomes: How do you set one up?
Open the PDM Administration Tool and expand Data Export/Import. Right-click either Export Rules or Import Rules > New Export/Import Rule.

Frequency to check import folder: Define how often (in minutes) the system will scan the designated folder for new files to import into the system.
Import from Folder: The folder where the files you want to import will be stored. This is generally a folder outside of the vault. You can paste a path directly into the field or use the … button to browse to a location of your choice.
Variable Alias Set: If you have created any variable alias sets, this is where you would select them (we’ll cover what these are a bit later). If your import data has the same data labels/headers, you can ignore this in favor of Do not use an alias set.

Output XML–files to folder: The folder where the files created by the export rule will be stored. This is generally a folder outside of the vault. You can paste a path directly into the field or use the … button to browse to a location of your choice.
Output XML-file name: You can use static text and/or dynamic variables (using the > button) based on the source file to make a unique name for each file.
Type of data to export:
(These three tabs are only available when you select Computed BOMS.)
Variables tab
Configurations tab: This lets you select which configurations you’d like to include in the export.
File Reference tab: This allows you to select which type and what versions of references you’d like to include.

If your ERP or other system requires specific field names for values you have mapped on your data card, but the variable name and the field name don’t match, you can use an Alias Set to change the name in the exported XML file to match. You can map specific variables in PDM to their equivalent field name in the receiving system by selecting the variables from the left and then entering their Alias on the right.
Alias sets are not required, and if none are chosen, the system just exports variable names as-is.
With the rules set up, we’ll want to select the transition these rules are triggered by. Once decided:



Finally, with our rules set and their actions in place, we should be able to reap the rewards of our labors. Our expectations for the Export rule are somewhat less involved than the Import rule. If working properly, the XML export is triggered by the file transition, and the XML file is placed in the expected folder, with the expected name and details inside.
When the import is run, however, the steps are a bit more complex. First, the formatted XML is placed in the expected folder for processing. Generally, the Database server service picks up the file within 60 seconds. The Database server service loads the data in from the XML file into the Database and waits to be called upon. When the part, assembly, or drawing is pushed through the target transition with the Import data from XML action, it triggers the imported data to write to the Database record for that file or those files.
While the example above shows how this data can be applied to model/drawing files, it isn’t the only function that can be taken care of via import. In this case, the XML file formatting determines what the file is being used for.
You can view a list of the example import files and their formats in the SWPDMClient/Support/ERP folder in the installation files under “…\SOLIDWORKS Downloads\SOLIDWORKS 20XX SPXX\SWPDMClient\Support\ERP”.
SOLIDWORKS also provides a set of general rules to help us understand these example XML files.

Below are some of the more common issues that you can run into when using import/export rules, and steps you can take to solve them.
What does this look like? Once imported, files should disappear from the import folder. If they remain past the set polling interval, the rule may be failing.
What does this look like? Files export as:
What does this look like? File names and variables containing special characters may show up incorrectly or not at all.
This can be caused by the XML header using the wrong encoding (e.g., UTF-8). The encoding listed in the header must match the encoding the file was saved under.
Open the file in Notepad and check the encoding in the file header. If needed, correct the encoding listed in the header and resave the file with that encoding.


What does this look like? Specific values fail to import, and an error appears in the Windows Application logs (Event Viewer > Windows Logs > Application) with references like:
In order for the import to locate and update the variable values for specific files, it needs to be able to identify/locate the file. In the XML file (just like in the XML export), there is a specific label that tells the system which value to use. If that value is not found in the PDM database on any file, this error should appear.
This can happen if the import XML has the wrong identification data for a given file (e.g., “1234” instead of “1233”), or if it is looking for a value labeled “partnum” but the variable is “partnumber”, etc. Further, this can be a problem with the formatting of the XML file itself. If the value being used to match files is a variable, pdmweid should be set to 0. Or, if the value is configuration-specific, the value of “idcfgname” should be set.
What does this look like? If PDM encounters a problem processing the BOM during the XML export, it will produce an error in Event Viewer > Windows Logs > Application: Failed to process export batches in database [Database name].
The error may happen multiple times as the system tries to process the file and fails each time. You will need to find the file causing the problem.
Resolving this error usually involves editing your SQL database. Reach out to Technical Support for help in addressing this safely.
What does this look like? XML import/export rules are powered by the PDM database service. The database service also powers a number of other things, so if your XML rules are failing, it may be worth looking for other signs as well:

XML Import and Export rules are a versatile way to migrate data in and out of SOLIDWORKS PDM. In addition to the steps in this blog, successful setup and use of this tool can often take some time and trial and error. As such, it’s best to implement this under the guidance of an experienced PDM administrator.
If GoEngineer is your reseller and you have any questions, please reach out to our Support team for assistance!
SHORTCUTS ⋅ SEARCHING ⋅ PDM ADD-IN
24 of our expert tips to help you master using SOLIDWORKS PDM. Improve performance, find files faster, and work like a pro.
SOLIDWORKS PDM Vault Upgrade: Standard to Professional
SOLIDWORKS PDM Notifications in the Vault
Permissions to Move Files and Folders in the SOLIDWORKS PDM Vault
Permissions to Read and Edit Files in the SOLIDWORKS PDM Vault
About Joe McWhorter
Joseph McWhorter is a SOLIDWORKS PDM Support Engineer based out of Chicago, Illinois. He joined GoEngineer in 2022 and holds a Bachelor's Degree from Augustana College. In his free time, he enjoys reading and cooking with his children, while collecting hobbies like they're trading cards.
Get our wide array of technical resources delivered right to your inbox.
Unsubscribe at any time.