Creating an Export Rule

Create an export rule to export SOLIDWORKS PDM BOM variables to an XML file that can be read into an ERP system.

If you want to use an alias set to map SOLIDWORKS PDM BOM variable to variables in an ERP system, you must create the alias set before creating the export rule. See Creating an Alias Set.

After creating the export rule, add a workflow transition action to trigger the rule. See Working with Transition Actions.

To create an export rule:

  1. Expand Data Import/Export , right-click Export rules, and select New Export Rule.
  2. In the Export Rule dialog box, type the Rule name.
  3. Specify a folder path for the XML output file.

    The path must be a folder that is accessible from the computer where the SOLIDWORKS PDM database service is running.

    If you specify a UNC-path, the database service that handles the export normally runs under the system user account which, by default, does not have access to the network. To have access to the network, run the service as a specified user or use administrative UNC paths. These paths include c$ for the C: of a computer, etc.

  4. For Output XML-file name, specify a file name or click and select variable components to be used in the export filename.
    If you chose a variable for the Output XML file name, it must exist and be populated by every file data card that is read for the exported data. If the variable does not appear or is unfilled on the card, the exported file will read .XML, 001.XML, 002.XML and so on.
  5. Select the type of BOM to export:
    • CAD BOM . Generates an XML file for drawing or assembly files containing a CAD BOM. The BOM layout determines the variables, configurations, and references to include in the XML data.

      Select whether to export all CAD BOMs or only activated BOMs.

      In the export transition action, use the Run for files option.
    • Computed BOM . Exports data from the computed BOM, generating an XML for all files, provided a BOM is defined.

      Select whether to export the BOM in table format, and whether all computed BOMs or only computed BOMs that have been activated are exported.

      In the export transition action, use the Run for files option.
    • Named BOM . Exports data from a saved named BOM. The named BOM layout determines the variables, configurations, and references to include in the XML data.

      Activated BOMs are exported in table format.

      In the export transition action, use the Run for named bill of materials option.
  6. If you chose Computed BOM as the type of data to export:
    1. On the Variables tab, for Bill of Materials to export, select the BOM column definition to use when the BOM is exported.

      If you did not select to export the BOM in table format, for Variable used to identify a file, select a variable value that defines each file in the exported XML data. For example, use this option if a unique part number is assigned to the file data card and the application processing the exported XML data uses that part number instead of the file name to identify the file.

      For Alias set to use in XML-file, select the alias set whose alias names will be substituted for data card variables in the generated XML file.

    2. On the Configurations tab, select whether to export all configurations, only active (last saved) configurations, or specifically named configurations.
    3. On the File References tab, specify the reference information to export, such as parent and child references.
    For details of options on these tabs, see Export Rule Dialog Box.
  7. Click OK.