The File Import Wizard in GainSeeker Inspections helps you set up PC Collect for file import through a standard Python script.
Contents [Hide] |
Before you can import any files, you must import the File Import script from the Design Library. You should name the script File Import.
In the GainSeeker Inspections module, click the File menu and choose Setup File Import.
In the File Import Browser, click New. This will display the File Import Configuration builder. (You can also Copy or Edit existing File Import Configurations.)
On the first step of the File Import Configuration builder:
Choose the name and location of the file (or files) to import.
This builder and the "File Import" script you imported are designed to process two basic types of files:
Text files where one character (such as tab, comma, or space) separates each column from the neighboring columns
Excel files – .xls and .xlsx are both valid
Set the File Properties and Feature Options to match the contents of these files
On the second step of the File Import Configuration builder:
Use Add Feature Type to identify each column of standards and/or data you wish to import
In the example below, we may want to import four SPC standards and four SPC data setups, for the Part number in column 0 with characteristics "Cavity Pressure", "Diameter X", "Diameter Y", and "Out of Round".
Drag Column headers and/or type values into the feature grid, ensuring that Shared values and Feature-specific values are set
For values such as traceability or date/time that are shared across all data columns, select Shared and set those values here:
On the third step of the File Import Configuration builder:
Specify the format of dates and times in the file
For text files, date and time must be in separate columns
For Excel files, one column may contain both date and time
Set options for how to manage files before and after their data is imported
Click OK to save this File Import Configuration.
This creates a *.fiw file in your User Documents 2 path.
To use the File Import Configuration you just created, log in to the PC Collect module.
Click the File menu, click Start File Import, and choose the File Import Configuration.
A command line to automatically run the File Import Configuration "CMM files", where your "User Documents 2" path is "Q:\GainSeeker\Data\Production\", would looks something like this:
"C:\Program Files (x86)\Hertzler Systems\GainSeeker\PCCollect.exe" pythonscript="File Import" fiwcfgloc="Q:\GainSeeker\Data\Production\CMM files.fiw"
The steps above describe how to use the standard File Import Python script to process the File Import Configurations created by the wizard.
However, you can also copy the standard File Import Python script and edit it. You will need to hard-code the name of the File Import Configuration, but then you can make any other desired changes about how the script will process that Configuration and import the desired files. Then you can use PC Collect to run this copy of the script from the Start Python function.
Another option is to directly edit the File Import Python script without hard-coding any configuration file names. Your File Import Configurations can still be launched in from the File | Start File Import menu in PC Collect, and your changes will apply to all File Import Configurations launched in this manner.
For more information, see Python Commands.