SOLIDWORKS PDM XML Import and Export Rules

 Article by Joe McWhorter on Nov 04, 2025

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.

What are XML Import/Export Rules and What Do They Do?

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.

Example Use Cases

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.

Scenario 1

Exports - Sending part or assembly data to ERP systems when a design is finalized

  • ERP systems often need detailed assembly or part data, so it may be part of your workflow to take the properties and data from a part or assembly after approval and pass it to the ERP as an XML file. This export can be triggered through transition actions.

Scenario 2

Imports - Migrating files into PDM

  • Let us assume you have files that were created outside of your PDM vault and, as a result, are missing information from their data card. If that data was tracked somewhere else, and can be reformatted into an appropriate XML file, the information could be imported into PDM via an XML rule, and the values on the data cards can be automatically updated on their next transition.

Creating the Rule

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.

Creating an Import/Export Rule in SOLIDWORKS PDM

Import Rules Fields

SOLIDWORKS PDM Import Rules Fields

Rule Name

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.

  • Setting this too frequently may bog down your system. We generally recommend 5-10 minute intervals.

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.

  • This must be a location accessible by the account running PDM’s database server service (not the SQL service). Full read/write access will be needed.
  • If using a network location, use UNC paths as opposed to a “mapped drive”.

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.

Export Rules fields

SOLIDWORKS PDM Exporting Rules Fields

Rule Name

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.

  • This must be a location accessible by the account running PDM’s database server service (not the SQL service). Full read/write access will be needed.
  • Note: If using a network location, use UNC paths as opposed to a “mapped drive”.

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.

  • If a file with the same name already exists, the system will automatically append a counter at the end of the name to ensure unique values.
  • Don’t include the .XML extension in the output. The system adds this automatically.

Type of data to export:

  • CAD BOM: Generates an XML file for drawing or assembly files that contain a CAD BOM.
    • The BOM layout, not the export rule, determines the variables, configurations, and references to include or exclude in the XML data.
    • Your workflow transition must use the Run for files option in the action to trigger this properly.
  • Computed BOM: Exports data from the computed BOM. Generates an XML file for all files, provided a BOM is defined.
    • Your workflow transition must use the Run for files option in the action to trigger this properly.
    • To export cut lists or item BOMS, select Computed BOM as the type, and then select a computed BOM template set up to include cut lists or items in the BOM to export dropdown below.
  • Named BOM: Exports named BOMs. As with CAD BOMs, the variables are defined by the BOM template layout and not the rule itself.
    • Your workflow transition must use the Run for named BOMs option in the action to trigger this properly.
  • Export BOM in table format: This formats the output in a flat table structure that matches the BOM as seen via the UI. If unchecked, data is formatted hierarchically, like an assembly tree.
    • CAD and Named BOMs are always formatted in tables and cannot be changed.
  • Export ONLY activated BOMs: The export will only run if a CAD or Computed BOM is marked “activated”.

(These three tabs are only available when you select Computed BOMS.)

Variables tab

  • Bill of Materials to export: Choose which template for BOMs you’d like to use. These are created in the “Bills of Materials” node in the admin tool.
  • Variable used to ID a file: The unique value used to identify a file. It’s generally best to use the default SOLIDWORKS PDM File ID, though Document Number, FileName, etc., work well too.
  • Alias set to use in XML-file: If the data being output requires a translation of the Data labels/headers, select the appropriate alias set.

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.

Variable Alias Sets

SOLIDWORKS PDM Variable Alias Sets

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.

Triggering Import/Export Rules

With the rules set up, we’ll want to select the transition these rules are triggered by. Once decided:

  1. From the PDM Administration tool, expand Workflows and double-click to edit the desired workflow.
  2. Click into the transition you’d like an XML rule to run during.
  3. Go to the Actions tab > Add Action.

    Triggering Import/Export Rules in SOLIDWORKS PDM

  4. Select Export Data to XML or Import data from XML from the Type dropdown.
    1. For Export Data to XML, select the export rule.
    2. For Import Data to XML, select the file name to import from.
      1. Note: Unless you have a specific reason to call out a specific file name (such as calling data from different files for different transitions), you can leave this as the wild card value; it defaults to: *

        SOLIDWORKS PDM Transition Action Type Export Data to XML
        Transition Action Type Import Data from XML in SOLIDWORKS PDM

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.

XML Formatting for Imports

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.

  • The encoding specified in the XML header must be the encoding that file is saved in.
  • All IDs must be unique (per type) in each XML file (i.e., no two files can share an ID); however, files and folders can share an ID as they are not the same type.
  • All IDs must be greater than 0. All values 1 and above are valid, but not 0 (zero).
  • Attribute values are considered text and must be in double quotes (i.e., attributes that are alpha-numeric must be in double quotes: id = a should be id = “a”, id= 3 should be id = “3”).
  • Some special characters are reserved for XML formatting (also called XML reserved characters) and cannot be used. They include the following (in bold): < > & ‘ “. They can still be used by replacing them with the appropriate substitute:
    • < becomes &lt
    • > becomes &gt
    • & becomes &amp
    •  becomes &apos
    •  becomes &quot
  • The XML file must include a DTD declaration. This is a way for the file to declare what type it is, hence “DTD” or Document Type Declaration. This is generally satisfied within the first or second line of the XML file, using a DOCTYPE callout.

    SOLIDWORKS PDM XML Formatting for Imports

Troubleshooting

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.

Imports are Failing

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.

Steps to Take:

  1. Verify the SOLIDWORKS PDM Database Server service is running.
  2. Verify the PDM Database Server service has access to the import folder.
    1. If the import folder is on a network location, try moving it to a location on the server running the PDM Database Server service instead. Be sure to change the import rule to look for the new location.
    2. If a network location is necessary, please be sure to use a UNC path instead of a mapped network drive.
  3. Verify the XML files are not read-only.
  4. Verify that the login account for the PDM Database Server service has read and write access to the target folder.
  5. Check Event Viewer logs on the server hosting the database service for related errors. (Event Viewer > Windows Logs > Application).
  6. Verify the XML file is correctly formatted.

XML File Names Missing Variable Values

What does this look like? Files export as:

  • .XML, 001.XML, 002.XML, etc.
  • Output file name set to [variable1]-[variable2][counter].XML.
  • Some files appear to be named correctly, others appear as “variable1-counter.XML”.

Steps to take:

  • Verify the Output XML file name.
    • The issue may be that the output name is set to something like [variable][counter].XML.
    • In this case, these files do not have a value for the variable used in the name, so only the counter is exported.
    • Alternatively, the variable field does not exist on all files.

Special Characters Are Not Recognized when Importing XML

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.

Steps to take:

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.

SOLIDWORKS PDM Special Characters Are Not Recognized when Importing XML

Special Characters Are Not Recognized when Importing XML in SOLIDWORKS PDM

Error: Could not find any variable value that matches node [document] idattribute

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:

  • Error(s) occurred when starting the data import for database 'cex'.
  • Error: 0x0 Description: The method was successfully executed.
  • Failed importing document attributes from node (#1) in file ‘C:\XML\ImportValues.XML’.
  • Could not find any variable value ‘S-2014-0034’ that matches node 's ‘idattribute’ ‘DocNumber’ (VariableID 142).
  • Error: 0x800402A6. Description: The specified variable does not exist.’

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.

Steps to take:

  1. Check the error message for the value that was not matched.
  2. This issue may occur with several files at once. Compare which fields are mentioned to narrow down the actual cause.
  3. Verify which identifier is being used and that the value for the target file matches the value in the XML.
  4. Verify which variable is used to match the XML data to the files in the vault and whether the pdmweid value is set correctly in the XML file.
  5. Check if the value is configuration-specific and whether the “idcfgname” field is blank, or if it calls out a specific configuration.

Error: The data import/export item was not found in the database

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.

Steps to take: 

Resolving this error usually involves editing your SQL database. Reach out to Technical Support for help in addressing this safely.

The Database Service isn’t Running

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:

  • Notifications aren’t sending (both SMTP and database type notifications would fail).
  • View Updates: Automatic refreshing of a user’s local vault view to automatically display updates from other users (new files added, variable updates, check-ins/outs) in the same folder without having to refresh File Explorer.
  • Card list updates: Cards making use of an SQL list may load an older version of the list or fail to load at all.
  • Cold storage.
  • On-demand replication would still work, but scheduled replication would fail.

Steps to take:

  1. From the Windows Services application, locate the SOLIDWORKS PDM Database Server Service.
  2. Verify this is running and, if it is not, try to start it.
  3. Once started, it should cycle through the queue of messages and exports built up since the last time it ran. Depending on the queue, it could take some time.

    SOLIDWORKS PDM Database Service Isn’t Running

    1. If it does not start, there may be a deeper issue. In which case, reach out to Technical Support.
  4. If the service itself is already running, you will want to verify that there are no logs mentioning issues logging into the SQL server. To check these, open Event Viewer > Windows Logs > Application.
  5. If there are any errors found, you may see them running periodically (generally 1-2 times every minute, minimum). Often, these errors will say something along the lines of The Owner SID on a Per-user Subscription doesn’t exist.
    1. If this is the case, the next step is to verify the SQL username and password used for both the Archive server service and (more importantly in this case) the Database server service.
    2. If, for any reason, the password is incorrect because the SQL username and password have been lost, we have a guide on resetting the SA credentials.

Final Thoughts

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!

24 Tips to Master SOLIDWORKS PDM

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.

Related Articles

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

SOLIDWORKS PDM Group Memberships by Folder

VIEW ALL SOLIDWORKS PDM ARTICLES

About Joe McWhorter

Joe McWhorter is a SOLIDWORKS Technical Support Engineer at GoEngineer.

View all posts by Joe McWhorter