The Export option lets you create a .pdf report that is encoded and embedded as part of a .gbs file. You can extract a .pdf report using the script: mit_decodeReport.py.
Shortcuts to Extract a PDF File from a GBS File
The mit_decodeReport.py is a Python script that extracts a fit report from the .gbs file and outputs it as a .pdf file. To enable quick access to the mit_decodeReport.py, you can define shortcuts as follows:
Windows
• | Goto <HW_Installation>/utility/scripts/plotting/mit/batch/ |
• | Right-click mit_decodeReport.py, and then select Send to>Desktop.
A shortcut appears on your desktop. You can copy or move the shortcut as needed. |
Linux
• | Use the ln -s command to create a symbolic link to <HW_Installation>/utility/scripts/plotting/mit/batch. |
• | Note that Windows style path names with "\" are allowed. |
• | Note that a path name with blanks is allowed provided the path name is enclosed in double quotes as follows: "C:\test directory\testName". |
Command Summary
The Export Data options are:
mit_decodeReport
|
-i <gbs-file-name>
|
-o <output_directory>
|
<options>
|
Arguments
The following are arguments for Export Data:
Argument
|
Description
|
-i <gbs-file-name>
|
Specifies a .gbs file, generated by the MIT, that is to be provided as input to the script.
|
-o <output-file-name>
|
Specifies the name of the output .pdf file to be generated. When this argument is not specified, the prefix of the .pdf is obtained from the prefix of the inputd .gbs file.
|
-h
|
Provides information about how to use this utility. Invoking mit_batch without any parameters also provides help content.
|
Examples
The following are examples of Export Data usage:
mit_decodeReport.py –i C:/input.gbs
• | Decode the .gbs file, C:/input.gbs, and generate a .pdf file, C:/input.pdf, in the same directory where the .gbs file presents. |
mit_decodeReport.py –i C:/input.gbs –o C:/output/rubber.pdf
• | Decode the .gbs file, C:/input.gbs, and generate a .pdf file, rubber.pdf, in the directory, C:/output. |
mit_decodeReport.py C:/input.gbs –o C:/output/test
• | Decode the .gbs file, C:/input.gbs, and generate a .pdf file, test.pdf, in the directory, C:/output. |
Note: If python is not installed on your system, then include the location of HyperWorks python in your path as follows:
Windows
set PATH <HW_INSTALLATION>/hw/python/python27/win64;%PATH%
Linux
setenv PATH <HW_INSTALLATION>/hw/python/python27/linux64:$PATH
• | The system does not know that files with the .py extension are python files. Therefore, invoke mit_decodeReport.py as follows:
python.exe mit_decodeReport.py -i C:/input.gbs –o C:/output.gbs |
• | Windows style path names with “\” are allowed. |
• | Blanks in paths are allowed inside of double quotes: “C:\test directory\testName”. |
• | The default .xml file contains only MIT options. You cannot specify path names for input and output files in this file. |
|
PDF with Logo and Copyright Information
You can include logo and copyright information in your .pdf report using a preference file. The contents of the preference file includes:
Steps to Include a Preference File in a .pdf
1. | Create an ASCII file in a directory. You can name the file as you like, for example: mit_pdf_preferences.mvw. |
2. | Copy into the ASCII file the text in the figure above. |
3. | Specify the full path name for the logo file as a value for the variable logo_file. |
4. | Specify appropriate text to use as a value for the variable cright. |
6. | Set the value of the environment variable HW_CONFIG_PATH to the preference file name: |
Bash shell: HW_CONFIG_PATH = “C:\Documents\utilities\ mit_pdf_preferences.mvw”
C Shell: setenv HW_CONFIG_PATH “/usr/fred/utilities/mit_pdf_preferences.mvw”
7. | After you restart MIT, MIT exports a .pdf file containing the specified logo and copyright. |
|