VPE Export operations
The VPE Manager provides the ability to export an entire VPE, or just certain portions such as processes, site variables, lookup tables, materials, machine data, etc.
Export a complete VPE when you want to:
Perform periodic data maintenance or updates in your staging environment, and then copy the updated VPE back to your production environment.
Copy a VPE to another server.
Provide a copy of the VPE to aPriori Customer Support regarding an issue.
Make a backup of the VPE before making changes to it.
You can export VPEs either one at a time, or several all at once.
Export just certain portions of a VPE (such as processes, lookup tables. data, etc.) for development or maintenance of a VPE. For example, you might develop or modify a process in one VPE (or in one process group) that would be useful in another VPE (or within the same VPE but in a different process group). Or you might regularly export, update, and re-import some of your data on a quarterly, semi-annual, or annual basis.
aPriori also provides additional options for editing smaller amounts of VPE data. See Editing VPE data for more information.
To export a single VPE
1 From the VPE Toolset window or the VPE Manager window, click File > Export > Export VPE to Zip.
Note: The Export to Excel option is deprecated as of aPriori Release 2014R1. Use Export to Zip for all VPE exports.
If you are in the VPE Manager window, you will only be able to export the currently open VPE. (For more information, see Opening a VPE on page 1.)
If you are in the VPE Toolset window, you will be presented with a list of VPEs. Select the one you wish to export.
Note: When you export an overlay VPE to a compressed file, you are given the option of exporting just the overlay VPE itself, or the entire “bundle” -- the overlay VPE plus all the VPEs from which it inherits. In general, you should always select the entire bundle.
2 Navigate to the folder where you want to save the exported VPE file, enter a name for the file, and click Save to display the VPE Change Log Entry window.
Although you are specifying a name for the exported file, the name of the VPE contained in the exported files does not change. When imported, any existing VPE with the same VPE name will be overwritten. If you want to maintain a backup of the original VPE, make sure to export it prior to importing. For more information, see Creating a new VPE on page 1.
3 Enter a description of the changes made to the exported VPE and click OK.
For example, if you are exporting a staging environment VPE to import it into a production environment, enter the changes made from the previous production version to make users aware of your updates.
You can also click Skip Log to export the VPE without describing the changes.
A single .vpe.zip file is created.
To export multiple VPEs
This is particularly useful when creating local backups of configuration work done in aPriori.
1 From the VPE Toolset window or the VPE Manager window, click File > Export > Multiple VPEs
2 Follow the prompts and the usage notes in the resulting Export Multiple VPEs window to:
Specify a folder to which the export files will be written.
Select the VPEs to export (CTRL-click or SHIFT-click to expand your selection(s).
Specify how to handle overlay VPEs: just the overlay VPE itself, or the entire “bundle” -- the overlay VPE plus all the VPEs from which it inherits. In general, you should always select the entire bundle.
Specify a prefix for the file names.
3 Click OK.
4 To export site variables
To export processes
See Exporting, modifying, and importing processes on page 1 for information about when and how to use aPriori's process import/export capabilities.
1 Open the VPE from which you want to export the process(es). In this example we will export from the aPriori USA VPE.
2 Click File > Export > Processes... from the VPE Manager tool bar.
3 In the Export Processes dialog, select the process group from which you want to export the process(es). In this example we will be exporting from the Sheet Metal process group.
4 Once you have selected the process group, expand and select the process-related elements that you want to export. In this example we just want to select the "3D Laser" so that we can copy it into a different process group. Then click OK.
5 When prompted, navigate to a folder and save the .zip file. Give it a more descriptive name if desired but be sure to leave the ".process.zip" extension intact.
6 Once the .zip file is saved, aPriori prompts you to also save a .txt file with a summary of the exported process info.
aPriori saves this in the same folder as (and with the same name as) the .zip file.
To export VPE Data to Excel
The VPE Toolset provides the ability to export VPE data such as machines, materials, tool shops, and plant variables to Excel spreadsheets. You can optionally edit the exported data in these Excel spreadsheets, and then import the data into either the original VPE or a different VPE where the imported data will be visible and used in subsequent costings in that VPE. This provides an efficient way to export/import just data of interest without including all the other elements of the VPE.
Note: If you have updated to 16.1 from an earlier release, make sure to read the "IMPORTANT NOTE ABOUT PRE-16.1 VPES" in the section "To Import VPE Data from Excel".
To add materials or machines, add a new row in the spreadsheet and populate it with the necessary details.
To remove a machine or a material, change the value in the Edit Operation column to “delete” by selecting from the dropdown menu.
Note: The Name column cannot be changed. Any changes to that column will be interpreted as a new material, machine, etc.
You should refer to the VPE Manager display whenever you change the values of fixed value fields (such as Cut Code) to ensure that the value you enter in Excel corresponds to an acceptable value in the VPE Manager.
The export process creates an index spreadsheet for the VPE, and separate spreadsheets for each of the process groups within the VPE. The index spreadsheet contains a cross-reference to all of the related process group spreadsheets and a sheet named "VPE_data" containing all of the plant information for the VPE.
1 Open the VPE in the aPriori VPE Manager window, then click File > Export > VPE Data to Excel.
Note: Alternatively, you can open a specific VPE from within the VPE Manager and then right-click the top entry in the left-hand navigation pane, and select Export > All VPE Data to Excel… from the context menu:
2 Navigate to the folder where you want to create the export Excel files. If you wish, modify the default name to something more specific. (The default name for the index spreadsheet is simply the VPE name. The spreadsheets for process groups have the process group name appended to the default name. For example, "aPriori USA-Casting.xls"). Click Okay.
This creates an Excel file for every process group in the VPE, as well as an "index" spreadsheet:
The index spreadsheet (the only one that does not have a process group appended to its name) contains the top-level information about the VPE, as well as a cross-reference to all of the other process group-related spreadsheets created by the export. The "top-level" info is what you see in the VPE Manager when you click the VPE name at the top of the navigation page.
The screenshots below show how the info in the spreadsheets map to the displays in the VPE manager. Note that the Import Behavior column in the index spreadsheet simply flags those fields which cannot be edited and then re-imported. Also, the strings in the Description column are populated from the "tooltip" text when you hover over and item in the VPE Manager. These strings also cannot be edited and then re-imported.
Index sheet mapping:
The spreadsheet for each process group contains sheets for materials, each machine, and (if applicable) tool shops. You can see the mapping between the VPE Manager display and the exported spreadsheet below, using the Casting process group as an example:
Materials (process groups without material stock)
The first tab in the export spreadsheet maps to the Materials table in the VPE Manager. Most process groups simply consider the basic properties of the materials and each row lists a different material:
Materials (process groups WITH material stock):
A few process groups -- Forging, Bar & Tube, Sheet Metal, and Sheet Metal -- Transfer Die -- must use material in the form of pre-formed stock: round tubes, solid bars, I-beams, etc. Each of these can come in different lengths, made of different materials, and these factors must be taken into account during the costing of the part that uses them. For these process groups, the Materials tab is much larger and is populated with all the additional stock information found in the VPE Manager.
When working with these stock-based process groups, it may also be helpful to refer to the Material Selection window in the main aPriori UI:
 
Machines:
The next several tabs contain the machine information.
Tool Shops:
Any tool shops defined under the VPE processes will be allocated to the far-right tabs in the export spreadsheets, with a "_tshops" extension.
Note: Only one tool shop is supported per process, so you cannot add additional tool shops via Excel.
To export VPE Lookup Tables to Excel
VPE lookup tables provide tabular data, either for a cost model in general, or for a specific process or operation. (Lookup tables are described in detail in the section "Working with Lookup Tables" in the Cost Model Workbench User Guide.) The VPE Manager provides the ability to export all lookup tables in a VPE to an Excel spreadsheet where the information can be imported into a different VPE or modified and then re-imported into the original VPE.
For a practical example of how this can work, you can review aPriori's separately licensed Wire Harness VPE, which uses this functionality to load and maintain a "Component Library" lookup table of approved parts. See "Updating the Component Library" starting on page 1 for more information.
1 Open the VPE in the aPriori VPE Manager window, then click File > Export > VPE Lookup tables to Excel.
3 Navigate to the folder where you want to create the export Excel files. If you wish, modify the default name to something more specific. (The default name is simply the VPE name. such as "aPriori USA.xls). Click Okay.
This creates an Excel file for every process group in the VPE, as well as an "index" spreadsheet for all of the other sheets created by the export.
You can now modify the Excel files with updated lookup table info and then re-import into the current VPE, or just import the exported Excel files into another VPE.
If you are modifying a sheet with data from a .csv file or another spreadsheet, it is critical that you ensure that the columns in the import file match the columns in the lookup table spreadsheet exactly.
Then you must copy the cells from the import spreadsheet and paste them into the corresponding cells in the Assembly componentLibrary sheet. If you are replacing all the information in your Component Library, make sure that no old data remains in the target spreadsheet after the Paste. If you are adding new information, make sure that you do not overwrite data that you wish to keep. Save the modified spreadsheet when done.
The screenshots below show how the data in the lookup table spreadsheets map to the displays in the VPE Manager. (The index spreadsheet is the same as described in the previous section for exporting VPE data.)
The spreadsheet for each process group has a tab for each lookup table in that process group:
To export from the command line
aPriori provides the ability to export VPE data (and optionally. lookup tables) to Excel spreadsheets from the command line. This requires some configuration as explained below.
1 Open the following file in a text editor:
<apriori_install_dir>\bin\exportVpeDataToExcel.properties
4 Edit the lines highlighted below as necessary:
templateFile=ext/project-management-plugin/macro/ide/exportMultipleVPEsData.xml
inputs.vpeFolder=<Enter destination folder here>
inputs.exportVPEs=CSL(asList(asMap('plantName', '<Enter VPE name here>')))
inputs.exportVPELevelData=true
inputs.exportMaterials=true
inputs.exportMachines=true
inputs.exportToolShops=true
inputs.exportLookupTables=false
inputs.useXls=false
Basic example -- The edited file below will export data from the "aPriori USA" VPE to Excel spreadsheets located in D:/aaa_tmp/000_vpe_export_folder:
templateFile=ext/project-management-plugin/macro/ide/exportMultipleVPEsData.xml
inputs.vpeFolder= D:/aaa_tmp/000_vpe_export_folder
inputs.exportVPEs=CSL(asList(asMap('plantName', ' aPriori USA')))
inputs.exportVPELevelData=true
inputs.exportMaterials=true
inputs.exportMachines=true
inputs.exportToolShops=true
inputs.exportLookupTables= false
inputs.useXls=false
Note: The vpeFolder path MUST use forward slashes ("/"), not Windows back slashes ("\").
Advanced example -- The edited file below additionally includes lookup tables, and exports from multiple VPES ("aPriori USA" and "aPriori Mexico") to older-style .xls (not .xlsx) files:
templateFile=ext/project-management-plugin/macro/ide/exportMultipleVPEsData.xml
inputs.vpeFolder= D:/aaa_tmp/000_vpe_export_folder
inputs.exportVPEs=CSL(asList(asMap('plantName', 'aPriori USA'), asMap('plantName', 'aPriori Mexico')))
inputs.exportVPELevelData=true
inputs.exportMaterials=true
inputs.exportMachines=true
inputs.exportToolShops=true
inputs.exportLookupTables= true
inputs.useXls=true
5 Open a command console and change to the aPriori installation bin directory. In this example, aPriori is installed at the root of the D: drive. Adjust as necessary for your installation.
6 Execute the following command line, substituting your actual values for the aPriori installation directory and your login credentials:
runMacro <apriori_install_dir>\bin\exportVpeDataToExcel.properties <your_apriori_login> <your_apriori_password>
Note: You MUST specify the complete aPriori installation path. If you specify a relative path (such as ".\exportVpeDataToExcel.properties", the command will fail.
As the export command runs it displays status on the console. Watch for error messages -- most common errors are due to back slashes in the properties file and relative pathnames in the command line. The export can take several minutes to complete, so if it looks like it is hanging, give it plenty of time before you decide to cancel.
When done, your export folder should contain Excel files for the process groups plus an index file for each VPE you specified.