- Replace txtParamName textbox with cboParamName dropdown combobox
- Load parameter names from column C in [参数配置] worksheet
- Implement automatic population of parameter dropdown during initialization
- Set first parameter as default selection when data is available
- Add proper validation and error handling for parameter data loading
- Improve data integrity by preventing manual input errors
This enhancement significantly improves user experience by eliminating manual typing and potential typos. Users can now select parameter names from a standardized list maintained in the configuration worksheet, ensuring consistency and reducing errors in the spec addition process.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add mParamWorksheet variable for parameter configuration worksheet
- Load material names from dedicated [参数配置] worksheet instead of extracting from BOM data
- Implement validation for parameter configuration worksheet existence
- Add header row logic (row 2) with data starting from row 3
- Improve code comments for better clarity
- Remove debug output for cleaner production code
- Implement proper error handling for parameter worksheet access
This architectural improvement separates configuration data from operational data, following the single responsibility principle. The [参数配置] worksheet serves as a centralized configuration source for target material names, making the system more maintainable and allowing business users to manage target materials without touching the main BOM data.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add txtConditionPreview textbox initialization in UserForm_Initialize
- Clear preview textbox when refreshing details panel
- Implement lstDetails_Change event handler for condition preview
- Display complete condition text when user clicks on list items
- Improve readability for long/complex condition expressions
- Add debug output for troubleshooting
This enhancement allows users to easily view the full condition text for each material entry in a dedicated preview textbox, addressing the issue of long conditions being difficult to read in the narrow list column.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add frmAddSpec user form with interactive UI for spec management
- Implement dynamic checkbox generation for material name selection
- Support both macro and granular selection modes for target materials
- Add strategy selection dropdown (APPEND/CLONE)
- Add cDynamicEvent class for handling dynamic control events
- Integrate with mSpecAdditionManager for pipeline execution
- Provide real-time validation and user feedback
- Enable fine-grained control over which specific BOM rows to modify
This creates a user-friendly interface layer on top of the existing strategy pattern architecture, allowing users to visually select materials and execute spec addition operations through a graphical form instead of direct code manipulation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update IModuleProcessor interface to accept targetBOMs collection instead of targetItemName string
- Remove filtering logic from strategy implementations (AppendOnly, CloneNew)
- Add LoadData method to mSpecAdditionManager for UI initialization
- Rename ExecuteAddition to ExecutePipeline with refined parameters
- Enhance test suite to simulate fine-grained UI selection behavior
- Enable precise row-level control by delegating filtering to UI layer
This refactoring achieves better separation of concerns where:
- Strategy layer focuses purely on execution logic
- UI layer handles selection and filtering
- Manager layer coordinates the pipeline flow
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add IModuleProcessor interface defining the processor contract
- Implement cProcessor_AppendOnly strategy for modifying existing BOM rows
- Implement cProcessor_CloneNew strategy for creating new BOM rows
- Add mProcessorFactory module for creating processor instances
- Add mSpecAdditionManager module for coordinating spec addition operations
- Enhance test suite with business logic layer and pipeline integration tests
This implements the Strategy pattern to allow flexible BOM modification behaviors while maintaining clean separation of concerns.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add new mBOMRepository.bas module for data access layer with LoadAll/SaveAll/InsertNewBOMRow functions
- Refactor cBOMRow.cls property methods for better readability and formatting
- Add comprehensive unit tests for BOM repository functionality in mTestEngine
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added VBA project structure including:
- Class modules for BOM row and condition engine
- Test engine module
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>