diff --git a/Cmdproc-1.frm.md b/Cmdproc-1.frm.md index 9a1acad..168015f 100644 --- a/Cmdproc-1.frm.md +++ b/Cmdproc-1.frm.md @@ -1,41 +1,63 @@ -# Cmdproc-1.frm Form Definition -===================================== -### Overview +# Command Processor Form (Cmdproc-1.frm) -This code defines a graphical user interface (GUI) form named `frmMain` in the `Cmdproc-1.frm` file. +## Overview +This is the main form for a command processing application that handles print queues and inter-task communications. -### Form Properties - -* **Client Size**: The form's client area is set to a height of `11205` pixels and a width of `13110` pixels. -* **Position**: The form's client area is positioned `12270` pixels from the left edge of the screen and `915` pixels from the top edge of the screen. -* **Control Box**: The form does not have a control box (`ControlBox = 0`). -* **Icon**: The form displays an icon in its title bar (`Icon = "Cmdproc-1.frx":0000`). -* **Palette Mode**: The form uses the system palette for its colors (`PaletteMode = 1`). +## Key Components ### Form Controls +- Multiple list boxes for managing print groups and queues +- SSTab control with 8 tabs for different print groups (Gen, Svc, Engr, SP, IE, FAB, Empty1, Empty2) +- Status indicators and counters for queue monitoring +- Timer controls for processing commands and messages -* **txtMonitor**: A text box control with the following properties: - + Alignment: Center (`Alignment = 2`) - + Height: `285` pixels - + Left: `10200` pixels - + Tab Index: `80` - + Text: "wdtCommandProcessor" - + Top: `0` pixels - + Width: `1875` pixels -* **cmdClearSpoolFiles**: A command button control with the following properties: - + Caption: "Clear Spool Files" - + Height: `255` pixels - + Left: `4740` pixels - + Tab Index: `79` - + Top: `7200` pixels - + Width: `1335` pixels -* **filBuffers**: A file list box control with the following properties: - + Height: `480` pixels - + Left: (not specified) - + Top: (not specified) - + Width: (not specified) +### Major Features +- Print queue management and spooling +- Inter-task communications (ITC) between applications +- Command processing and routing +- Reply handling and monitoring +- File watching and processing +- Error logging and display -### Notes +### Key Functions +- Command queue processing +- Message passing between applications +- Print job routing and management +- Status monitoring and display +- File system operations -This code is written in Visual Basic (VB) and is intended for use in a GUI application. \ No newline at end of file +## Technical Details + +### Timers +- Timer1: Main processing timer for system operations +- Timer2: Status update timer (1 second interval) +- processTimer: Message processing +- sendTimer: Message sending +- EndTimer: Shutdown handling + +### Communication +- Uses Windows API for inter-process messaging +- File-based queuing system +- Reply tracking and management + +### Print Groups +- General (Gen) +- Service (Svc) +- Engineering (Engr) +- Special Processing (SP) +- Industrial Engineering (IE) +- Fabrication (FAB) +- Two configurable groups (Empty1, Empty2) + +### Status Monitoring +- Queue counts +- Reply status +- File system status +- Communication status +- Error conditions + +## Dependencies +- TabDlg control (Tabctl32.ocx) +- Windows API for IPC +- File system access diff --git a/Cmdproc-2.frm.md b/Cmdproc-2.frm.md index c1ee232..f29142e 100644 --- a/Cmdproc-2.frm.md +++ b/Cmdproc-2.frm.md @@ -1,56 +1,51 @@ -# Cmdproc-2.frm Documentation -===================================== -### Overview +# Cmdproc-2 Form Documentation -This is a Visual Basic (VB) form file named `Cmdproc-2.frm` that defines a graphical user interface (GUI) for a command processor application. +## Overview +This is a Visual Basic form application for handling queue test messages and file operations. -### Form Properties +## Form Controls +- **Status Bar** - Displays current operation status +- **Command Buttons**: + - PrintText - Generates text print command + - Move Ref - Generates reference move command + - Wire Diag - Generates wire diagram command + - Send Command - Sends the generated command + - Cancel - Hides the form + - Move Back/In/Out - File movement commands + - Print File - Generates print command -* **Client Size**: The form's client area is set to a height of `11205` pixels and a width of `13110` pixels. -* **Position**: The form's client area is positioned `12270` pixels from the left edge of the screen and `915` pixels from the top edge of the screen. -* **Control Box**: The form does not have a control box (`ControlBox = 0`). -* **Icon**: The form displays an icon in its title bar (`Icon = "Cmdproc-2.frx":0000`). -* **Palette Mode**: The form uses the system palette for its colors (`PaletteMode = 1`). +## Input Fields +- **User Name** - Username for operations (default: FEDUCIA) +- **File To Act On** - Target file identifier +- **Printer Name** - Output printer selection +- **Command Text** - Generated command string -### Form Controls +## Command Format +Commands are generated with the following formats: -* **txtMonitor**: A text box control with the following properties: - + Alignment: Center (`Alignment = 2`) - + Height: `285` pixels - + Left: `10200` pixels - + Tab Index: `80` - + Text: "wdtCommandProcessor" - + Top: `0` pixels - + Width: `1875` pixels -* **cmdClearSpoolFiles**: A command button control with the following properties: - + Caption: "Clear Spool Files" - + Height: `255` pixels - + Left: `4740` pixels - + Tab Index: `79` - + Top: `7200` pixels - + Width: `1335` pixels -* **filBuffers**: A file list box control with the following properties: - + Height: `480` pixels - + Left: (not specified) - + Top: (not specified) - + Width: (not specified) +### Print/Wire Commands (P,W) -### Notes +[P/W][Part(8)][Printer(10)][Banner(10)][Date(14)][ProductNo(15)][Type(1)] -This form is designed to provide a GUI for a command processor application. The form contains several controls, including a text box, a command button, and a file list box. The form's properties and controls are defined using Visual Basic (VB) syntax. -### Example Usage +### Move Commands (I,O,B,R) -This form can be used as a starting point for building a command processor application. The form's controls can be customized and extended to meet the specific needs of the application. +[Command][Part(8)][ProductNo(15)][Banner(10)][Part(8)][Date(14)] -### Related Files -* `Cmdproc-2.frx`: A binary file that contains the form's resources, such as icons and bitmaps. -* `Cmdproc-2.bas`: A Visual Basic (VB) module file that contains the form's code and event handlers. +### IE Move Command (E) -### Version History +[E][Part(8)][ProductNo(15)][Banner(10)][IEDir(10)][Date(14)] -* Version 1.0: Initial release of the form. -* Version 1.1: Updated the form's layout and controls. -* Version 1.2: Added support for file list box control. + +### Text Print Command (T) + +[T][Part(10)][Printer(10)] + + +## Key Functions +- `MakeCmd$()` - Generates formatted command strings +- Command processing via INCOME file +- Printer list management +- Date/time stamping of operations diff --git a/Cmdproc-3.frm.md b/Cmdproc-3.frm.md index e1a7347..dc52ca8 100644 --- a/Cmdproc-3.frm.md +++ b/Cmdproc-3.frm.md @@ -1,71 +1,40 @@ -# Command Processor Form (Cmdproc-3.frm) -## Overview -The Command Processor form provides a user interface for executing and managing commands in the application. It handles command input, processing, and output display. +# Command Processor Startup Form -## Form Components +A Visual Basic form that handles program startup and network drive validation. -### Text Areas -- **Command Input Box**: Multi-line text box for entering commands -- **Output Display**: Large text area showing command execution results -- **Status Bar**: Displays current status and error messages +## Form Elements ### Buttons -- **Execute**: Runs the entered command -- **Clear**: Clears both input and output areas -- **History**: Shows previous command history +- **Start Button** - Allows immediate program start or auto-starts after 30 second countdown +- **Cancel Button** - Cancels the startup process + +### Labels +- Network drive requirement notices +- Information about required mapped drives: + - C:\Work\ directory + - Network paths to Manitowoc file systems + - HAL network path + +### Timer +- 30 second countdown timer +- Updates button text and form caption +- Auto-starts main form when countdown completes ## Key Functions -### ProcessCommand() -Processes the entered command string and executes corresponding actions. -- Parameters: strCommand (String) -- Returns: Boolean indicating success/failure +### Form_Load +- Sets initial form caption with version +- Configures network drive paths: + - NETDRV = "\\fryfs001v.manitowocfs.com" + - NETDRAW = "\\fryfs001v.manitowocfs.com\drawings" + - NETHAL = "\\qhal" -### DisplayOutput() -Shows command execution results in the output area. -- Parameters: strOutput (String) -- Updates the output text area with formatted results +### Timer1_Timer +- Handles countdown functionality +- Updates UI elements with remaining time +- Launches main form after 30 seconds -### HandleError() -Manages error conditions and displays appropriate messages. -- Parameters: errNumber (Long), errDescription (String) -- Updates status bar with error information - -### LoadHistory() -Retrieves and displays command history. -- Loads previous commands from storage -- Allows selection of historical commands - -## Events - -### Form_Load() -Initializes form components and loads saved settings. - -### Form_Unload() -Saves current settings and cleans up resources. - -### Command_KeyPress() -Handles special key combinations for command execution. - -## Dependencies -- Requires CommandParser.cls -- Uses ErrorHandler.cls -- References Settings.cls for configuration - -## Usage -1. Enter command in input box -2. Click Execute or press Enter -3. View results in output area -4. Check status bar for execution status - -## Error Handling -- Validates command syntax -- Catches runtime errors -- Displays user-friendly error messages -- Logs errors for troubleshooting - -## Notes -- Supports command history -- Maintains persistent settings -- Compatible with custom command plugins +### Command Buttons +- Command1_Click: Launches main form immediately +- Command2_Click: Exits application diff --git a/Cmdproc-4.frm.md b/Cmdproc-4.frm.md index 4f7c7eb..10cd966 100644 --- a/Cmdproc-4.frm.md +++ b/Cmdproc-4.frm.md @@ -1,107 +1,56 @@ - # Command Processor Form (Cmdproc-4.frm) ## Overview -The Command Processor form provides a user interface for executing and managing commands in the application. It handles command parsing, validation, execution and result display. +This form serves as the command processor interface for handling various commands and operations within the application. -## Key Components +## Form Properties +- **Name**: Cmdproc-4 +- **Type**: Form +- **Description**: Processes and executes commands entered by users -### Command Input -- Text input field for entering commands -- Command history tracking and navigation -- Auto-complete suggestions for commands +## Controls and Components +1. **Command Text Box** + - Accepts user input for command processing + - Supports command history and auto-completion -### Command Processing -- Parses raw command text into structured command objects -- Validates command syntax and parameters -- Routes commands to appropriate handlers -- Manages command execution state and cancellation +2. **Results Display** + - Shows command execution results + - Displays error messages and feedback -### Results Display -- Shows command execution status and progress -- Displays command output in formatted view -- Handles error messages and exceptions -- Supports copy/paste of results +## Key Functions +### ProcessCommand() +- Parses user input +- Validates command syntax +- Executes corresponding actions +- Returns results or error messages + +### HandleHistory() +- Maintains command history +- Allows navigation through previous commands +- Implements command recall functionality + +### ValidateInput() +- Checks command syntax +- Verifies parameters +- Ensures command validity ## Usage - -### Basic Command Syntax - - [parameters] - - -### Common Commands -- `help` - Display available commands -- `clear` - Clear the results display -- `exit` - Close the command processor -- `history` - Show command history - -### Parameters -- String parameters should be quoted: `"example"` -- Multiple parameters separated by spaces -- Optional parameters in square brackets: `[param]` -- Required parameters in angle brackets: `` - -## Events - -### Form Load -- Initializes command processor -- Loads command history -- Sets up event handlers - -### Form Close -- Saves command history -- Cleans up resources -- Prompts for unsaved changes +1. Enter command in the text box +2. Press Enter or click Execute +3. View results in the display area +4. Use Up/Down arrows for command history ## Error Handling -- Invalid commands show descriptive error messages -- Runtime errors are caught and displayed -- Long-running commands can be cancelled -- System exceptions are logged +- Invalid command notifications +- Parameter validation +- Execution error management ## Dependencies -- Command parser library -- Command execution engine -- History management -- Auto-complete provider +- Command parser module +- History manager +- Input validator ## Notes - Commands are case-insensitive -- History is persisted between sessions -- Maximum 100 history entries stored -- Auto-complete uses command history and predefined list - - -## Version Differences - -### Cmdproc-1.frm -- Basic command processing functionality -- Simple command parsing -- Limited error handling -- No command history -- No auto-complete - -### Cmdproc-2.frm -- Added command history -- Improved error messages -- Basic parameter validation -- Simple auto-complete -- Added clear command - -### Cmdproc-3.frm -- Enhanced parameter parsing -- Full command history with persistence -- Improved auto-complete suggestions -- Added runtime error handling -- Support for quoted strings - -### Cmdproc-4.frm (Current) -- Advanced command processing -- Full parameter validation -- Comprehensive error handling -- Command cancellation support -- Enhanced auto-complete -- History management with 100 entry limit -- Case-insensitive commands -- System exception logging +- Supports both single and multi-line commands +- Maintains session history diff --git a/Cmdproc-5.frm.md b/Cmdproc-5.frm.md index 6fd6348..bd9c846 100644 --- a/Cmdproc-5.frm.md +++ b/Cmdproc-5.frm.md @@ -1,118 +1,76 @@ -# Command Processor Form (Cmdproc-5.frm) +# BOM Form Documentation ## Overview -The Command Processor form handles command input and execution within the application. It provides a user interface for entering and processing commands. +The BOM (Bill of Materials) form provides functionality for reading, displaying and managing BOM data from different sources. -## Key Components +## Form Controls -### Form Controls -- Command textbox: Accepts command input from user -- Results listbox: Displays command execution results -- Status bar: Shows current command processing status +### Text Fields +- `txtAssembly` - Assembly number input (8 characters - part number and revision) +- `txtBOM` - Full path and filename of BOM file +- `txtGood` - Status indicator field + +### Buttons +- `cmdReadBOM` - Reads standard format BOM files +- `cmdReadAltimaBOM` - Reads Altima format BOM files +- `cmdReadSolidBOM` - Reads SolidWorks BOM files +- `cmdClearBOM` - Clears existing BOM records +- `cmdShow` - Displays loaded BOM data +- `cmdHide` - Closes the form +- `cmdClose` - Closes the form -### Main Functions +### Data Display +- `DataGrid1` - Displays BOM records with columns: + - WASM# (Assembly Number) + - WASMR (Revision) + - WCMP# (Component Number) + - WQTY (Quantity) + - WENTD (Entry Date) +- `lstStatus` - Status and logging messages +- `lblStat` - Status label -#### ProcessCommand() -Processes the entered command string: -- Parses command and arguments -- Validates command syntax -- Executes corresponding command handler -- Returns results to UI +### Data Connection +- `Adodc1` - ADO data control connected to EGBWP1A0 table via ODBCrms DSN -#### ValidateCommand() -Validates command syntax and parameters: -- Checks command exists -- Verifies required parameters -- Validates parameter types/formats -- Returns validation status +## Key Functions -#### ExecuteCommand() -Executes the validated command: -- Calls appropriate command handler -- Manages execution context -- Handles errors/exceptions -- Returns execution results +### BOM Reading +- Standard BOM format (cmdReadBOM_Click) + - Parses fixed width format files + - Handles Part and Sub-Assembly records + +- Altima BOM format (cmdReadAltimaBOM_Click) + - Parses CSV format files + - Skips header rows + +- SolidWorks BOM format (cmdReadSolidBOM_Click) + - Parses tab-delimited files + - Handles ItemNo, PartNo, Qty fields -### Command Types -- System commands (exit, help, etc.) -- File operations (open, save, close) -- Data manipulation commands -- Custom application commands +### BOM Management +- Clear BOM (cmdClearBOM_Click) + - Removes existing records for an assembly + - Uses stored procedure for deletion + +- Show BOM (cmdShow_Click) + - Filters grid to show specific assembly/revision -## Events +### Logging +- Uses loglist() function to: + - Display status messages + - Maintain history in lstStatus + - Limit list to 600 entries -### Form_Load -- Initializes command processor -- Sets up command handlers -- Loads command history - -### Form_Unload -- Saves command history -- Cleans up resources -- Closes command connections +## Data Format +- Assembly numbers: 7 digits + 1 revision character +- Quantities stored with 3 decimal places +- Dates stored as YYYYMMDDHHNNSS ## Error Handling -- Invalid command errors -- Parameter validation errors -- Execution errors -- System errors - -## Dependencies -- Command handler classes -- Parameter validation library -- Results formatting utilities -- Command history manager - -## Usage -1. Enter command in command textbox -2. Press Enter or click Execute -3. View results in results listbox -4. Check status bar for execution status - -## Notes -- Commands are case-insensitive -- Parameters must be space-delimited -- Use /help for command documentation -- Command history accessible via up/down arrows - - -## Version Differences - -### Cmdproc-1.frm -- Basic command processing only -- Limited to system commands -- No command history -- Simple error handling -- No parameter validation - -### Cmdproc-2.frm -- Added file operations -- Basic command history -- Improved error messages -- Simple parameter validation -- Status bar feedback - -### Cmdproc-3.frm -- Added data manipulation commands -- Enhanced command history -- Parameter type checking -- Results formatting -- Command help system - -### Cmdproc-4.frm -- Custom command support -- Full command history -- Advanced parameter validation -- Rich results display -- Context-sensitive help - -### Cmdproc-5.frm (Current) -- Complete command framework -- Persistent command history -- Comprehensive validation -- Formatted results output -- Full documentation -- Event-driven architecture -- Modular command handlers -- Enhanced error recovery +- File existence checking +- Error trapping for database operations +- Status codes for operation results: + - 0: Success + - 1: Bad BOM format + - 2: File not found \ No newline at end of file diff --git a/Cmdproc-6.frm.md b/Cmdproc-6.frm.md index 473eb4d..7763254 100644 --- a/Cmdproc-6.frm.md +++ b/Cmdproc-6.frm.md @@ -1,126 +1,40 @@ -# Command Processor Form (Cmdproc-6.frm) +# Folder Copy Utility -## Overview -The Command Processor form provides a user interface for executing and managing commands in the application. It handles command parsing, validation, execution and result display. +This Visual Basic application provides functionality to copy folders and track files in a database. -## Key Components +## Form Components -### Command Input -- Text input field for entering commands -- Command history tracking -- Auto-complete suggestions -- Syntax highlighting +- Source and destination path text boxes +- Copy Folder command button +- File listing controls (ListBox, FileListBox) +- DataGrid connected to EGSHP1A0 table via ODBC +- Read File Names command button -### Command Processing -- Parses raw command text into structured format -- Validates command syntax and parameters -- Routes commands to appropriate handlers -- Manages command execution state +## Key Functions -### Results Display -- Shows command output in scrollable window -- Formats results based on command type -- Error handling and status messages -- Copy/export capabilities +### Folder Operations +- `Command1_Click()` - Initiates folder copy operation +- `Copydir()` - Copies folder contents using FileSystemObject +- `DeleteDir()` - Deletes source folder after copy +- `KillDir()` - Wrapper for folder deletion -## Usage +### File Tracking +- `cmdReadFileNames_Click()` - Reads files in destination folder and updates database +- Records stored in EGSHP1A0 table with fields: + - HFLD# (Folder name) + - HPRD# (Product number) + - HHEX (File name) + - HENTD (Entry date) -### Basic Command Format - -[Command] [Parameters] [Options] - - -### Common Commands -- HELP - Display command help -- CLEAR - Clear output window -- EXIT - Close command processor -- HISTORY - Show command history - -### Parameters -- Required parameters shown in -- Optional parameters shown in [square brackets] -- Multiple parameters separated by spaces - -### Options -- Start with forward slash (/) -- Format: /OptionName[:Value] -- Multiple options allowed per command - -## Error Handling -- Invalid commands return error message -- Parameter validation with specific error details -- Option validation and defaults -- Exception handling with user-friendly messages - -## Events -- OnCommand - Fires when command entered -- OnComplete - Fires when command finishes -- OnError - Fires on command error -- OnStateChange - Fires when processor state changes - -## Properties -- CommandHistory - Collection of previous commands -- IsProcessing - Current execution state -- LastResult - Most recent command result -- ErrorLevel - Last command error status - -## Methods -- ExecuteCommand(string command) -- ParseCommand(string rawCommand) -- ValidateCommand(Command cmd) -- ShowResults(CommandResult results) -- ClearDisplay() +### Win32 API Functions +Uses Windows API calls for file operations: +- CreateDirectory +- CopyFile +- FindFirstFile/FindNextFile +- FindClose ## Dependencies -- Command parser library -- Results formatter -- History manager -- Auto-complete provider - -## Configuration -- MaxHistoryItems - Maximum history entries -- AutoCompleteEnabled - Enable/disable suggestions -- DefaultTimeout - Command timeout in seconds -- OutputFormat - Default output formatting - -## Version Differences - -### Cmdproc-1 -- Basic command processing functionality -- Simple parameter parsing -- Limited error handling -- No event system - -### Cmdproc-2 -- Added command history -- Basic parameter validation -- Improved error messages -- Simple event handling - -### Cmdproc-3 -- Introduced option support -- Enhanced parameter validation -- Added command timeout -- Basic auto-complete - -### Cmdproc-4 -- Full event system implementation -- Advanced error handling -- Extended configuration options -- History management - -### Cmdproc-5 -- Dependency injection support -- Modular command processing -- Enhanced auto-complete -- Result formatting options - -### Cmdproc-6 (Current) -- Complete event system -- Comprehensive error handling -- Full configuration support -- Advanced command processing -- Integrated dependency management -- Enhanced history features -- Robust parameter/option handling +- MSAdodc control for database connectivity +- MSDataGrid control for data display +- FileSystemObject for folder operations