GRIP Reference Guide > Developing & Executing Programs > Automating with GRADE Batch / Batch & Script Files / About GRADE
GRADE, GRADE Batch, and Scripted Automation
About GRADE
GRADE ("GRIP Advanced Development Environment") is a separate executable that runs GRIP functions (edit/compile/link/batch) against your native file system.
- Start on Windows: Start > All Programs > NX <version> > NX Tools > NX Open Grip.
- Start on UNIX: run the
GRADEcommand from the OS shell.
GRADE main menu functions:
- Edit
- Compile
- Link
- Change Directory
- List Directory
- Send Output to [CRT]
- Compile Listing [ALL]
- Change Editor [VI]
- Grade Batch
- Turn Menu on/off
Other GRADE Options
- Change Directory — changes current directory.
- List Directory — lists current directory contents; supports a file template filter.
- Send Output To — redirects compile/link output: 1) Screen (CRT), 2) Line Printer
(LP), 3) File, 4) Suppress Output (Null). (See also the
&LDEVGPA symbol.) - Compile Listing — toggles listing mode between All (source statements, variable storage locations, labels, array sizes, errors) and Errors Only.
- Change Editor — specify a different OS editor for the Edit command.
Using GRADE Batch (option 9 from the GRADE menu)
Submits jobs to a batch queue. Options:
| Option | Description |
|---|---|
| Submit Operation | Submits one batch job to Compile, Link, Compile & Link, or Run a GRIP program. Input can be a single file or a file list; runs in current directory unless a full path is given. |
| List Queue | Lists contents of the current batch queue. |
| Change Directory | Changes the current batch directory. |
| List Directory | Lists contents of the current directory. |
| Cancel Job | Cancels a scheduled batch job by job number (BID). |
| Send Output To | Line Printer (LP), File, or Suppress Output (Null). |
| Change Queue | Changes which batch queue GRIP batch operations run on. |
| Edit | Edits a file with the current OS editor (e.g. vi). |
| Change Editor | Changes the default editor. |
| Turn Menu On/Off | Toggles the per-step menu display. |
| Quit | Returns to the main GRADE menu. |
Automating with Batch (Windows) / Script (UNIX) Files
Outside of GRADE, you can drive compile/link/run using OS-native batch/script files
and the gripbatch command/script with switches and arguments.
- UNIX: Bourne shell scripts supplied at
UGII_BASE_DIR/ugii/gripbatch. They start the GCAL image and the NX image. - Windows: MS-DOS batch files, also at
UGII_BASE_DIR/ugii/gripbatch; the GCAL image lives atUGII_BASE_DIR\ugopen\gcal. - Both platforms let you customize/write your own scripts from the supplied ones, used either to (a) Compile and Link, or (b) Execute a GRIP program.
GRIPBatch Switches (partial — key ones)
Switches are matched by keyword; the table below gives the minimum abbreviation.
| Keyword | Min. | Description |
|---|---|---|
-compile |
-c |
Compiles one or more GRIP programs. A single .grs file compiles alone; with -list, each listed file compiles in order (independently — one failure doesn't stop the rest). Successful compiles produce a .gri next to the source. |
-link |
-l |
Links one or more GRIP programs. With -list, links every .gri in the list. A successful link produces a .grx next to the .gri. |
-erlst |
-e |
Changes compile listing output from "ALL" to errors-only (same idea as GRADE's Compile Listing toggle). |
-list |
Treats the given file as a Source List File (see below) rather than a single program. |
(Additional switches exist beyond this sample for run/output-device control — see the live GRIPBatch Switches page for the complete list.)
Source List File Format
When using -list (or /list on Windows), the "file name" argument is actually an OS
text file listing one GRIP program per line — each line names a program to compile,
link, or both. Example (UNIX):
/users/source/grip/main
/users/source/grip/prog1
prog2
/users/source/grip/test/prog3
Source: https://docs.sw.siemens.com/documentation/external/PL20220512394070742/en-US/nx_api/nx/2212/nx_api/en-US/grip/dev_execution/dev_grade_ov.html · retrieved Tue Jul 07 2026 00:00:00 GMT+0000 (Coordinated Universal Time)