VPE Import operations
You can import exported VPEs into the VPE Manager, either one at a time, or several all at once. You may want to do this when installing a regional data library update, or when moving a modified VPE from a testing environment into production.
You can also import just certain portions of a VPE that reside in spreadsheets created by various export commands, such as data, site variables, processes, or lookup tables. This can be useful if you want to take advantage of information in one VPE (or another process group) and add it to a different VPE (or process group).
To import a single VPE
1 Select File > Import > VPE... from the aPriori VPE Manager menu bar to display the Import VPE Files window.
7 Navigate to the folder that contains the VPE you want to import and select it.
You can select any VPEs that has been exported as a Microsoft Excel (.xls) or compressed (.vpe.zip) file.
If a compressed file was created in a different version of aPriori, you will not be able to import it.
8 Click Open to import the selected VPE and display the imported files in the Loaded VPE window.
If the imported VPE has the same name as an existing VPE, the existing VPE will be overwritten.
9 Click OK.
To import multiple VPEs
This option is particularly useful when importing updated Regional Data Libraries, or when importing backup VPE files.
1 Select File > Import > Import Multiple VPEs... from the aPriori VPE Manager menu bar to display the Import Multiple VPEs window.
2 Navigate to the folder that contains the VPEs that you want to import.
3 Read the Usage Notes in the window to aid you in your selection. Note that you can import only files with .vpe.zip extensions.
4 Click OK.
To import site variables
To import processes
Use this option to import spreadsheets that were created with the export processes command. See Exporting, modifying, and importing processes on page 1 for information about when and how to use aPriori's process import/export capabilities.
Note: If a branch node has nothing defined in it (for example, no node attributes, CSL , lookup tables, process setup options, etc.), then it is skipped/ignored on import.
1 Open the VPE which contains the process group into which you wish to import the exported process(es). (See To export processes on page 1.)
2 From the VPE Manager tool bar click File > Import > Process... Then in the Import Processes dialog, navigate to the .process.zip containing the exported process(es) that you wish to import, then click OK.
3 In the resulting Import Processes dialog, select the process group into which you want to import the process. Then select the elements of the process which you wish to import, and leave unchecked anything that you do not want to import. (In this example, we are importing all elements into the Sheet Plastic process group.) Click OK when done.
4 Once the process has been imported into the process group, you can modify it as necessary (see the Cost Model Workbench User Guide).
To Import VPE Data from Excel
The VPE Manager provides the ability to import VPE data such as materials, machines, plant variables, and tool shops from Excel spreadsheets. Typically, these spreadsheets would have been previously exported and perhaps modified with updated information before being imported into a VPE (either a different VPE, or the same VPE form which it was originally exported). This mechanism is very useful for doing VPE maintenance such as updating labor rates, material rates, and other data elements that must be revised in the VPE on a regular basis.
For more information about the format of these spreadsheets and how to create them, see To export VPE Data to Excel on page 1.
1 Open the VPE Manager on the VPE to which you want to import the data, and from the tool bar click File > Import > VPE Data from 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 Import > All VPE Data to Excel… from the context menu.
2 Navigate to and click the index Excel file. (This is the one without a process group embedded in its name. For example, if you had previously exported the data from the aPriori USA VPE and kept the default name, the index file would be "aPriori USA.xls".)
3 Click Open.
Note: If aPriori displays an error message when you try to import, double-check that you have not selected one of the process group files or another incorrect spreadsheet. You MUST select the index spreadsheet.
The import can take several minutes if it consists of many process groups. Asterisks appear next to process groups in the Navigation pane if they have been modified by the import.
4 (Optional.) When prompted, either enter a description of your changes and click OK or click Skip Log.
5 (Optional.) When prompted to publish the VPE, click yes.
Note: Imported data will not be available to other VPE users unless you Publish.
IMPORTANT NOTE ABOUT PRE-16.1 VPES: If you have upgraded to 16.1 from a previous release and use the Export VPE Data to Excel feature, you will encounter an error when re-importing these spreadsheets unless you perform the manual fix described below.
The error is "Default tool material does not exist: Mold Base".
To avoid this error, perform the following steps before using Import VPE Data from Excel. This procedure is necessary ONLY if you upgraded to 16.1 from an earlier release.
1 Open the Plastic Molding spreadsheet in Excel. (This spreadsheet should have name similar to "<vpeName>-Plastic Molding.xls".)
2 Go to the "Injection_Molding_tShops" tab. (The "_tShops" tabs are to the far right in the workbook.)
3 Under the "Default Tool Material Name" column, change "Mold Base" to "Steel". (If the value in this cell is already "Steel", your VPE is already up-to-date and you do NOT need to perform this fix.)
4 Repeat Step 3 for the "Reaction_Injection_Molding_tShops" tab and the "Structural_Foam_Molding_tShops tab.
5 Save the Excel spreadsheet. You should now be able to execute Import VPE Data from Excel without error.
To Import VPE Lookup Tables from Excel
The VPE Manager provides the ability to import lookup tables from Excel spreadsheets. Typically, these spreadsheets would have been previously exported and perhaps modified with updated information before being imported into a VPE (either a different VPE, or the same VPE form which it was originally exported).
For information about lookup tables, see the section "Working with Lookup Tables" in the Cost Model Workbench User Guide. For information about exporting lookup tables, see To export VPE Lookup Tables to Excel on page 1. For an example of how the separately-priced aPriori Wire Harness VPE makes use of lookup table import/export to maintain a Component Library of approved parts, see Updating the Component Library starting on page 1.
Note: When you need to remove rows when editing a lookup table spreadsheet, it is critical that you do not leave empty rows. If you select one or more rows and press the Delete key, you remove the contents of the cells but leave the empty rows in place. This will cause problems when you import the spreadsheet into aPriori. Therefore, use the right-mouse-click Delete option, and ensure that the rows are removed as well as their content.
1 Open the VPE Manager on the VPE to which you want to import the lookup tables, and from the tool bar click File > Import > VPE Lookup tables from Excel.
2 Navigate to and click the index Excel file. (This is the one without a process group embedded in its name. For example, if you had previously exported the lookup tables from the aPriori USA VPE and kept the default name, the index file would be "aPriori USA.xls".)
3 Click Open.
Note: If aPriori displays an error message when you try to import, double-check that you have not selected one of the process group files or another incorrect spreadsheet. You MUST select the index spreadsheet.
4 Refer to the usage notes in the Import VPE Lookup Tables from Excel dialog, and select either Replace or Add as appropriate. The import can take several minutes if it consists of many process groups. Asterisks appear next to process groups in the Navigation pane if they have been modified by the import.
5 (Optional.) When prompted, either enter a description of your changes for the log and click OK or click Skip Log.
6 (Optional.) When prompted to publish the VPE, click yes.
To import from the command line
aPriori provides the ability to import VPE data (and optionally lookup tables) from Excel spreadsheets from the command line. (For information about creating these spreadsheets, see To export from the command line.)This requires some configuration as explained below.
1 Open the following file in a text editor:
<apriori_install_dir>\bin\importVpeDataFromExcel.properties
Edit the lines highlighted below as necessary:
templateFile=ext/project-management-plugin/macro/ide/importMultipleVPEsData.xml
inputs.vpeFolder=<Enter source folder here>
inputs.availableVPEs=CSL (asList(asMap('name', '<Enter xls or xlsx file name for the imported VPE here>')))
inputs.importVPELevelData=true
inputs.importMaterials=true
inputs.importMachines=true
inputs.importToolShops=true
inputs.importLookupTables=false
inputs.replaceRows=false
Basic example -- The edited file below will import "aPriori USA" VPE data from the Excel spreadsheets located in D:/aaa_tmp/000_vpe_export_folder. The spreadsheet filename you specify in the third line must be that of the index file -- the one that includes only the VPE name, not a process group name.
templateFile=ext/project-management-plugin/macro/ide/importMultipleVPEsData.xml
inputs.vpeFolder=D:/aaa_tmp/000_vpe_export_folder
inputs.availableVPEs=CSL (asList(asMap('name', 'aPriori USA.xls')))
inputs.importVPELevelData=true
inputs.importMaterials=true
inputs.importMachines=true
inputs.importToolShops=true
inputs.importLookupTables=false
inputs.replaceRows=false
Note: The vpeFolder path MUST use forward slashes ("/"), not Windows back slashes ("\").
Advanced example -- The edited file below additionally includes lookup tables, and also imports multiple VPES ("aPriori USA" and "aPriori Mexico"). It also specifies that data from the spreadsheet should overwrite any data in the VPE with the same name:
templateFile=ext/project-management-plugin/macro/ide/importMultipleVPEsData.xml
inputs.vpeFolder=D:/aaa_tmp/000_vpe_export_folder
inputs.availableVPEs=CSL (asList(asMap('name', 'aPriori Mexico.xls'),asMap('name', 'aPriori USA.xls')))
inputs.importVPELevelData=true
inputs.importMaterials=true
inputs.importMachines=true
inputs.importToolShops=true
inputs.importLookupTables=true
inputs.replaceRows=true
2 To import lookup tables: Set inputs.importLookupTables=true in the properties file. This allows lookup table data to be imported.
If you exported from the command line, by using the exportVpeDataFromExcel.properties file with inputs.importLookupTables=true, the lookup tables will be exported as part of the Excel sheets containing the data. They can then be imported alongside the rest of the VPE data, as part of those spreadsheets that were previously exported.
If you exported from the VPE Manager UI, by using File > Export > VPE Lookup Tables to Excel, the lookup tables will be exported independently of the data. The Excel spreadsheets will only contain lookup tables and will have the same names as those containing VPE data, so they cannot both be imported at the same time.
3 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.
Execute the following command line, substituting your actual values for the aPriori installation directory and your login credentials:
runMacro <apriori_install_dir>\bin\importVpeDataFromExcel.properties <your_apriori_login> <your_apriori_password>
Note: You MUST specify the complete aPriori installation path. If you specify a relative path (such as ".\importVpeDataFromExcel.properties", the command will fail.
As the import 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 import 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 VPE(s) should contain the data from all the Excel files.
Note: To see the new VPE data after importing using the command line, it is important to close the VPE and then click File > Refresh Database Connection from the main window toolbar.