Disclaimer Certain commercial equipment, instruments, or materials are identified in this paper in order to facilitate understanding. Such identification does not imply recommendation or endorsement by the National Institute of Standards and Technology, nor does it imply that the materials or equipment identified are necessarily the best available for the purpose. User's Guide for the Apparel STEP Translator for PC Compatible Computers by Thomas Murphy and Howard T. Moncarz Factory Automation Systems Division National Institute of Standards and Technology (NIST) January, 1992 1. Introduction The Apparel STEP1 Translator is a computer program for translating apparel pattern data between different file formats using a set of neutral data structures based on the NIST apparel information model [Lee90]. This program was initially developed on an Applec Macintosh_ computer. In the summer of 1991, it was ported to an IBM PC computer. This document describes how to install and run the program on a PC compatible computer. The report, Apparel STEP Translator [Moncarz91], provides a general description of the program's implementation. The software is available from NIST on an IBM-formatted, low density disk (5 1/4", unless 3 1/2" is requested). This distribution disk contains the latest version of the Translator for the IBM PC and compatible computers. The disk includes the complete source code for the program, the run-time version of the program itself (the executable), help files used by the program during its operation to guide the user, project files for managing program development, and a number of sample pattern data files. The data files were provided by the U.S. Air Force and contain pattern data for military uniforms. A file named readme.doc on the disk gives a brief overview of the program and lists the contents of the disk, including a description of each directory and file. Also included in that file is a report of known problems and current update information. This software was developed as part of an ongoing project at NIST to extend STEP to include apparel applications. The project is sponsored by the Defense Logistics Agency, and the work is being carried out in cooperation with the Computer Integrated Manufacturing Committee of the American Apparel Manufacturers Association (AAMA). In the short term, the project goal is to develop a neutral data format for exchanging two-dimensional pattern data between apparel CAD systems. In the long term, the goal is to develop an information model that can be used to encompass the entire apparel life cycle. This achievement would allow all of the processes involved in the apparel life cycle to share the same data. The U.S. effort to develop STEP is called PDES2. APDES is the acronym given to the NIST work in extending PDES to include apparel. In this document the expression APDES Translator refers to the Apparel STEP Translator. 1.1 System Requirements In order to run the IBM version of the Translator, you must have an IBM or compatible computer with VGA graphics capabilities. The minimum configuration it was tested on was an XT with 640K RAM and running DOS 3.3. It should run on any configuration that is upwardly compatible to this one. To install the software as it is distributed, you must have a hard disk drive or at least two floppy drives, one of which is high density. (If you have a hard drive, you only need one floppy drive, which can be low or high density.) 1.2 Features The PC version of the APDES Translator features the following: o Ability to translate between any two of these three formats: PN3, DXF4, and STEP o Easy to use, menu-driven system o Full screen text editing and viewing functions o Pop-up help screens from within the program o VGA routines to display pattern pieces 1.3 Overview Section 2 describes the procedure for installing the APDES software from the distribution disk onto your hard drive. Section 3 contains a brief overview for starting and operating the program. It can be used if you want to start operating the program immediately. Section 4 contains a detailed description of program operation; it is organized as a reference guide for operating the program. 1.4 Conventions The following typographic conventions are used in this manual: Courier File names, computer output, and menu commands (e.g. Help) COURIER Directory names (e.g. APDES) Courier bold User input (e.g. mkdir APDES) COURIER BOLD Directory names that are user input (e.g. APDES) Individual key stroke (e.g. ) 2. Installation The APDES software (including the executable, project, source, help, and data files) is distributed on an IBM-formatted disk in a compressed format. This disk contains a self-extracting file named apdes_se.exe. To install the software onto your system, first create a directory named APDES. This directory should be created on your hard drive, if you have one. Otherwise, it should be created on your high density floppy drive. For example: C>mkdir APDES (Note: some keyboards may contain the key or instead of .) will create the directory, APDES, on your hard drive C:. Next, go to your floppy drive where the distribution disk is mounted (e.g. A:), and type the following: A>apdes_se -d C:\APDES This command will execute apdes_se.exe, decompress the APDES software, and transfer the resulting directories and files to C:\APDES. The only file necessary to run the APDES Translator is apdes.exe. The help files (all of the files with .hlp extensions) are not required, but without them you cannot use the Translator's built-in help functions. 3. Operation This section contains a brief overview for starting and operating the APDES Translator. Refer to Section 4 for detailed instructions on operating the APDES Translator. The APDES Translator must be installed on your computer before it can be operated. Refer to Section 2 for instructions on installation. After the APDES Translator has been installed, change the current directory to APDES, and enter the command apdes to operate the program: C>cd APDES C:\APDES>apdes It is important that you run the APDES Translator from the directory which contains the file apdes.exe and the help files (.hlp files). If you do not, the program will not be able to access the help files. When the program starts, the first thing you will see is the APDES Translator introductory screen, which displays general information about the program. There is also a menu bar at the top of the screen which lists the names of the menus available to operate the program. When you press any key, the title screen will disappear, and the File menu item in the upper left corner of the screen will be highlighted. The File menu will be displayed as a list of commands under the File menu item. This list of commands is called a pull-down menu. The first item in this list, New, is highlighted. If you press the enter key, the New command in the File menu will be invoked. The commands available to you to operate the APDES Translator are organized into seven pull-down menus. Use the cursor keys to move to the desired menu, and use the cursor keys to move to the desired menu item within each pull-down menu. The menu that is highlighted in the menu bar is the active menu, and the item highlighted in the pull-down menu is the active command. The active command will be invoked when the key is pressed. The primary capabilities of the Translator are parsing and generating DXF, PN, and STEP formatted files. These functions are executed from the Parse and Generate menus. To parse a file means to read a data file in one of the three formats (DXF, PN, or STEP) and translate it to a neutral data format. To generate a file means to translate the neutral data format to one of the three file formats and write that to disk. A file cannot be generated unless some file was previously parsed. The program will indicate an error if you try to generate a file without first parsing one. Once a file has been parsed, it can be graphically displayed using the Display Pattern command from the Special menu. As with generating, an error is indicated if you try to display a pattern without first parsing a data file. The Translator operates in one of two possible modes: Edit mode or Menu mode. The mode of operation described above is the Menu mode. When you open a file or create a new file (using the corresponding File menu commands, Open or New), the program will automatically switch to Edit mode. This mode is used to view or edit existing text files or to create new ones. Once a text file has been opened or created, it is referred to as the current text file. In Edit mode, the current text file is displayed in a window on the screen, the Edit label is highlighted in the menu bar, and a blinking cursor appears in the text window. To return to Menu mode, press the key. To later continue editing the current text file, position the menu bar over the Edit label and strike . The Translator contains a help function. Pressing will display a help screen explaining the basic operations of the program. For more detailed help, the Help menu provides several help screens describing each menu of the program. When you are finished using the Translator, select the Quit command from the File menu to quit to DOS. If you have opened a text file that you have changed and not saved, the program will give you a chance to save it before exiting from the Translator. 4. Detailed Instructions This section contains detailed instructions for operating the program. Section 4.1 presents an overall description of the menu system. Section 4.2 describes each command, with the exception of the Edit command. Because the operation of the Edit command is different than the rest of the menu commands, it is described separately in Section 4.3. 4.1 The Menu System The APDES Translator is organized into a series of pull-down menus, each containing a number of commands. The bar along the top of the screen (called the menu bar) contains the titles of the various menus. The menu titles are _, File, Edit, Parse, Generate, Special, and Help. One of these menu titles is always highlighted to indicate which menu is currently active, or "open". Immediately after starting the program, the File menu is opened and the word File is highlighted in the menu bar. Figure 1 is a diagram of how the menu system would appear if all of the menus were pulled down at the same time. (The program allows only one menu at a time to be pulled down.) Pressing the or cursor keys will close the current menu and move the selection to the adjacent menu. Another way to move quickly from one menu to another is to press and hold down the key while typing the first letter of the menu. For example, pressing will close the current menu and open the Help menu. With the exception of the Edit menu, each pull-down menu consists of a list of commands. The selection bar is a highlighted area that you can move up and down in a menu by using the cursor keys. To select a command from a menu, simply move the selection bar to the desired command and press . A second way to perform a menu command from a pulled-down menu is provided. One letter (usually the first letter) of each command is highlighted indicating the letter to type to activate that command. Typing the command letter is sometimes quicker than positioning the selection bar and pressing . For example, to view a DOS directory listing when the File menu is displayed, you can either move the selection bar to Directory and hit , or simply type the letter . Some commands, although they appear in only one menu, can be activated from any menu. For example, you do not have to be in the File menu to view a directory listing. You can view a directory listing from any menu by pressing . Commands like are called hot-key commands, because they can be issued no matter what menu is currently active. If a menu command has an associated hot-key command, the corresponding hot key is displayed on the right side of the menu selection. Thus, in the File menu, the menu selection for viewing a directory reads "Directory alt-D", indicating that is the hot key for viewing a directory. The complete list of hot-key commands is shown below. Note that three of the commands, Help, File|Close, and File|Save, are invoked by function keys. These keys do not require the key to be simultaneously depressed. Key Stroke Menu Equivalent Action File|Save As Save the current text file with new name. File|Change Dir Change the current working directory. File|Directory View a disk directory. File|New Create a new text file. File|Open Open a text file for editing. File|Quit Quit the program (exit to DOS). Help| View help screen. General Operations File|Close Close the current text file. File|Save Save the current text file. is a hot-key command that will display a pop-up help screen giving some basic guidelines for using the APDES Translator. The remaining hot-key commands are included in the File menu and will be described in detail in Section 4.2.2. 4.2 Menu Commands The menus shown in Figure 1 are described in detail in the sections below. 4.2.1 The _ Menu The _ in the upper left corner of the screen is the symbol for the About menu. There is only one command currently available from this menu: About. About displays some general information about the program. It is not a help screen, but rather an information screen that tells where, when, and by whom the program was developed. 4.2.2 The File Menu The File menu contains commands for opening and closing text files as well as changing and viewing DOS directories. The nine available commands in the File menu are described below. If a command has a hot-key equivalent, it is given after the command. New The New command creates a new text file and then switches to Edit mode. If a file is open that has been changed, the program will verify that you wish to close the current editor file and enable you to save the modifications. When you execute New, the program will ask for a file name, but the newly created file is not saved to disk until you use either the Save or Save As command. The hot key for creating a new file is . Open The Open command loads an existing text file, so that you can edit or view the text. If there is already a file open that has been changed, the program will verify that you wish to close the current editor file and enable you to save the modifications. When the Open command is given, the file selection window will appear, and you will be prompted for a file mask. The file mask is a search string telling the program which file names to list. The mask can contain the standard DOS wild-card characters like * and ?. Pressing will give the default file mask, "*.*" (which displays all file names). Next the program will display a list of all the files that match the given mask. Select one of these files by positioning the menu bar on the desired file name and pressing . After opening the file, the Translator will switch to Edit mode. The hot key for opening a file is . Close The Close command will erase the current text file from memory and erase the text window from the screen. If you have changed the current text file, the program will verify that you wish to close the file and enable you to save the modifications. If you close a file without saving it, all changes to the file are lost. The hot key for closing a file is . Save Save will save the current text file to disk. If there is an existing file on disk with the same file name, Save will erase it and write over it without confirmation. If you are afraid of erasing previous unmodified versions of a text file, use Save As instead of Save, or change the directory using the Change Dir command before you save. The hot key for saving a file is . Save As Save As performs the same operation as Save, except it allows you to specify a new file name under which to save the file. You will not be prompted if a file with this name already exists. Check with the Directory command to avoid overwriting an existing file. The hot key for this command is . Directory Directory will display a listing of the current disk directory. When you call the Directory command, the program will open a window on the left portion of the screen and prompt you for a file mask. If you hit without typing a mask, the program will use the default mask, *.*, which will list the names of all of the files in that directory. The hot key for viewing a directory is . Change Dir The Change Dir command allows you to change the current working directory. Initially, the current working directory is the one from which you started the program. When you select Change Dir, the program will first display the current directory at the bottom of the screen. After pressing any key, it will prompt you for a new directory. Pressing will cancel the operation. The hot key for changing directories is . Print The Print command will print a text file. Currently, the Print command is not implemented. The DOS print command can be used instead. Quit The Quit command will terminate the APDES Translator and return to DOS. If there is a text file open that has been changed and not saved, the program will verify that you wish to discard changes. Before quitting, the program will also verify that you indeed wish to exit to DOS. The hot key for quitting is . 4.2.3 The Edit Menu The Edit menu is handled differently than the other menus. When Edit is selected, the built-in editor is invoked directly, rather than through a pull-down menu. The editor is described in detail in Section 4.3. 4.2.4 The Parse Menu From the Parse menu, you can parse either a Gerber PN file [GGT88], an AutoCADr DXF_ file [AutoCAD88], or a STEP file [ISO91]. PN File This command will parse a Gerber PN file. PN, which stands for piece number, is a proprietary format developed by Gerber Garment Technology for representing apparel patterns. DXF File This command will parse a DXF formatted file. DXF is a proprietary format developed by AutoDesk for exchanging general computer-aided design data. Currently, the AAMA is working on a standard set of conventions for representing apparel pattern data within the DXF format. The Translator program supports an initial version of the DXF pattern conventions. STEP File This command will parse a STEP formatted file. The STEP physical file contains instances of the various entities defined by an information model developed at the National Institute of Standards and Technology [Lee90]. When a Parse command is executed, the program will display the file selection window described previously in the Open command. You must enter a file mask (or accept the default) and then select a file using the cursor movement keys. (Pressing instead of selecting a file name will cancel the operation.) When a file is parsed, the program will display a status box on the screen. If the file is successfully parsed, a success message will be displayed in the status box; otherwise an error message will be displayed. Press any key to close the status box and continue. Once a file is parsed, it remains active until another file is parsed or the program is terminated. To graphically display a pattern piece after it has been parsed, select Display Pattern from the Special menu. 4.2.5 The Generate Menu The Generate menu looks the same as the Parse menu, but instead of reading pattern files, the Generate menu contains commands that create pattern files. The same three file formats supported by Parse are available from the Generate menu: PN, DXF and STEP. If you try to execute a Generate command before you have parsed a file into memory, the Translator will display an error message. The Generate commands are listed below: PN File This command will generate a PN data file from the pattern piece currently active. DXF File This command will generate a DXF data file from the pattern piece currently active using the AAMA conventions. STEP File This command will generate a STEP data file from the pattern piece currently active using the STEP conventions for physical file formatting. When you select a command from the Generate menu, the program will ask for a file name to generate. If a file already exists with the file name given, the new file will overwrite it. A status box on the screen will report the status of the generate operation and any errors. 4.2.6 The Special Menu The Special menu contains commands for viewing and printing the graphic representation of an apparel pattern piece. There are two available commands: Display Pattern Issuing this command will clear the screen and draw a picture of what the pattern piece should look like (with base size and graded sizes). An error message will be displayed if there is no pattern piece currently in memory. This command requires that your computer system has VGA graphics capabilities. Print Pattern This command is currently not implemented. 4.2.7 The Help Menu The help features of the APDES Translator are easily accessed by pressing . If you are in Menu mode, pressing will display a screen of information about how to use the menu system. If you are currently editing a text file, pressing will display a list of editor commands. If you need more detailed information about one menu in particular, more specific help screens are available through the Help menu. To view one of these screens, select the appropriate command from the Help menu. General Operations This command is the same as typing when you are in Menu mode. The general help screen contains a summary of how to use the menu system, a brief description of each menu, and a list of available global commands. File Menu Help This command displays a help screen describing specifically what commands are available in the File menu and what each one does. Editor Help This command displays a help screen for the editor. The editor help screen gives a list of all of the editor commands including cursor movement, editing commands, and file commands. Parse Menu Help This command displays a help screen for the Parse menu, describing all of the available commands in the Parse menu. Generate Menu Help This command displays a help screen for the Generate menu, describing all of the available commands in the Generate menu. Special Menu Help This command will display a screen of information about the commands available in the Special menu. Help with Help Menu This command gives detailed information about how to use the help features of the APDES Translator, including a list of the available help screens and instructions for calling them. 4.3. The Built-in Editor The APDES Translator has a built-in, full-screen file editor which can be used to view or edit text files without exiting to DOS. The editor is intended to be used with the text representation of pattern data files. However, it will operate with any file that is a text file. To view or edit an existing file, select Open from the File menu or type , the corresponding hot key. This command will prompt for a file name, read the specified text file into memory, and open an edit window on the screen. The file name is displayed along the top border of the edit window; the bottom border of the window is a status line. Within the window you will see the text of the current file, with the cursor positioned at the top of the file. 4.3.1 Entering and Exiting the Editor The APDES Translator operates in one of two possible modes: Edit mode or Menu mode. The Menu mode of operation has been described in detail previously in this document. When you create a new file or open an existing file (using , or the corresponding File menu commands) the program will automatically switch to Edit mode. When you are in Edit mode you can no longer move between menus by using the cursor keys, because these keys are used to move the cursor within the edit window. The hot keys, of course, are still active. You can determine when the program is in Edit mode because (1) an edit window will be displayed on the screen with a double line border, and (2) a blinking cursor will be displayed inside the edit window. When you are in Edit mode and you wish to switch to Menu mode (for example, you wish to temporarily stop editing and want to parse a PN file), press the key. The cursor will disappear and the edit window border will change from a double line to a single line, indicating that the program is in Menu mode. Switching from Edit mode to Menu mode does not close the current text file. It merely pauses the editing features and allows you to perform menu commands. In other words, the text file previously opened will still be displayed. If you perform a Display Pattern command, the edit window will be erased, and a picture of the pattern will be displayed. Pressing any key when the pattern is displayed will cause the pattern to be erased and the program to be returned to Menu mode. Also, the previously displayed text file will be displayed again. 4.3.2 The Cursor When you are in Edit mode, there is always a blinking cursor in the edit window, indicating your current position within the current file. The cursor is either a blinking line underscoring the current character, or a blinking block over each character. When the cursor is a blinking line, the editor is in the overwrite state. This means that any characters typed will write over the existing text. When the cursor is a blinking block, the editor is in the insert state. This means that any characters typed will be inserted into the text file just before the cursor, pushing the subsequent text to the right. These two states are toggled with the key. The default is the overwrite state. 4.3.3 The Status Line The bottom line of the edit window is the status line. The current line number and character position are displayed on the left side of the status line. These numbers are the coordinates of the cursor position in the text file. When the editor is in insert mode, the letters INS are displayed on the right side of the status line. 4.3.4 Cursor Movement The arrow keys on the numeric keypad allow you to move the cursor within a text file. Below is a list of the arrow key commands: / Move the cursor one character to the left or right. / Move the cursor to the previous line or next line, respectively. / Display the previous or next screen of text in the text file. Move the cursor one word to the left. Move the cursor one word to the right. 4.3.5 Editing Commands The following commands provide some simple editing features like inserting and deleting text: Pressing will insert a blank line into the text file before the current line. (The current line is the line containing the cursor.) Pressing will delete the line containing the cursor, shifting all subsequent lines up. The key will delete the character immediately before the current cursor position, shifting all subsequent characters in the line to the left. The key will delete one character at the current cursor position, shifting all subsequent characters in the line to the left. The key will switch from the insert to the overwrite state, or vice-versa. 4.3.6 File Commands from within the Editor The following commands have been described previously because they are hot-key commands in the File menu. They are presented again here briefly, because they are useful for doing file operations from the Edit mode (without having to switch to Menu mode and accessing the File menu). Save the current text file with new name. Create a new text file. Open a text file for editing. Close the current text file. Save the current text file. References [AutoCAD88] Autodesk, Inc., AutoCADr Reference Manual , Appendix C, "Drawing Interchange and File Formats," Sausalito, CA, January 1988. [GGT88] Gerber Garment Technology, Inc., AM-5/Gerber 400 Training Workbook, Document No. 052298001, Issue No. 2, GGT, January 1988. [Lee90] Lee, Y. T., On Extending the Standard for the Exchange of Product Data to Represent Two-Dimensional Apparel Pattern Pieces, NISTIR 4358, National Institute of Standards and Technology, Gaithersburg, MD, June 1990. [Moncarz91] Moncarz, H. T. and Lee, Y. T., Apparel STEP Translator, NISTIR 4612, National Institute of Standards and Technology, Gaithersburg, MD, June 1991. [ISO91] International Organization for Standardization, ISO CD 10303-21, Product Data Representation and Exchange - Part 21: Clear Text Encoding of the Exchange Structure, ISO TC184/SC4 N78, March 1991. 1STEP, an abbreviation for the Standard for the Exchange of Product Model Data, is an emerging international standard to represent a product's data throughout the product's manufacturing life cycle. 2PDES is the abbreviation for Product Data Exchange using STEP. 3PN is a proprietary file format for apparel pattern data from Gerber Garment Technology, Inc. 4DXF_ is a proprietary file format from AutoDesk, Inc. used in their AutoCADr product. Page {page|1} Page {page|1}