### Using DataPageStats.exe

This tool lets you create a new XML statistics file from your current part program. If you're using PC-DMIS 2010 or higher, you can simply use the STATS/ON command in PC-DMIS instead.

To use this tool:

1. Ensure that your PC-DMIS part program contains dimensions.

2. In your PC-DMIS part program, add an EXTERNAL COMMAND at the end of the part program that references the DatapPageStats.exe file. By default, this file is located here:

C:/Program Files/WAI/DataPage+/DataPageStats.exe

The DataPageStats.exe command supports the following parameters:

1. - No parameters
     This starts DatapageStats in the default ReceiveAll mode. See "DataPageStats Working Modes" below.

   - -l or -listening
     This starts DataPageStats in listening mode. See "DataPageStats Working Modes" below.

   - -e [mode] or -end [mode]
     This ends the previous DataPageStats instance. [mode] determines the termination type. If mode is not used, or if mode is a 1, it indicates success. Any other value indicates a failure. A failure tells DataPageStats to not import the data file into DataPage+.

   - -s or -settings
     This displays the settings dialog box.

   - -r or -reset
     This abandons the XML data being gathered and continues gathering data on the following command.

3. Execute your part program. When the execution reaches the EXTERNAL COMMAND, the executable runs. A DataPageStats window with a progress bar appears while the XML output is performed unless a setting has been marked to minimize the window.

- Settings - This displays the Settings for DataPageStats utility. This is discussed in "Settings for DataPageStats" below.

- Exit - This cancels the generation of the XML file. A Confirm Leave message appears asking if you want to exit the product. If you click OK, it will exit. In PC-DMIS, a Delete message then appears asking if you want to abandon the incomplete data file. If you click Yes, the XML file is appended with an .uncompleted extension.

This file type is ignored by DataImporter. If you click No, a normal XML file is created that DataImporter can import into the database.

4. Once the program executes a part program containing statistical data, it creates the following file these two files and places them in your DirectoryForStatsFiles sub directory:

1. - An XML file based on the data within that program.

   - An XAML CAD model of your part.

5. Once these files the file exists inside the directory, you can use the PcdmisXMLStatsToDatabase.exe file or the DataImporter.exe file to import the XML statistics and the XAML file into a DataPage+ database of your choice. See "Using PcdmisXMLStatsToDatabase.exe" and "Using DataImporter.exe".

DataPageStats Working Modes

The DatapageStats tool supports these working modes:

ReceiveAll

This is the default working mode. An external command is inserted at the END of the PC-DMIS part program as shown below.

DatapageStats will exit automatically when it's finished receiving all data from PCDMIS.

Listening

This mode runs as a background application, listening to the PCDMIS execution events. An External Command is inserted at the START of the PC-DMIS part program with a -listening parameter as shown below.

DatapageStats will exit automatically when PC-DMIS finishes executing the active part program.

Settings for DataPageStats

The Settings for DataPagePlus utility is available to update the XML filename as needed.

1. To start Settings for DataPagePlus, from the Start menu navigate to Start | All Programs | DataPage+ | Tools | Settings for DataPageStats.

2. The Settings for DataPageStats dialog box appears.

- Browse... - This changes the directory to where the XML file will be stored.

- Edit... This changes the name of the XML file. %DateTime% represents the date and time that appear in the filename when generated.

- Receive all hit points - Mark this if you want the XML file to include all the hit points for a feature. If this is cleared, the XML file is written without any real hit data; only the nominal, measured nominal and centroid values are stored.

- Receive all profile infos - Mark this if you want the XML file to include all the hit point info for profile dimensions. If this is cleared, the XML file is written without any real hit data; only the nominal, measured nominal and centroid values are stored.

- Minimize progress window when start up - Mark this if you want to hide the DataPageStats Progress Window when PC-DMIS runs DataPageStats.

- Languages list - Choose a language from the drop-down list if you want to change the language used for the Settings for DataPageStats dialog box. It will immediately reopen in the selected language.

- OK - This closes the Settings for DataPageStats dialog box. Any changes made are saved.

- Cancel - This closes the dialog box without saving any changes.