From Hours to Minutes: Automating Door Colouring in SolidWorks
We created a SolidWorks macro to automate door colour assignments in assemblies, ensuring precise and consistent colour coding across designs.
The Challenge
- Complex colour logic: Managing complicated upper–lower cabinet colour rules across multiple design schemes (including COASTAL LUXE) was difficult to standardize.
- Manual assignments: Colouring doors by hand in SolidWorks was slow, repetitive, and error-prone, especially in assemblies with dozens of configurations.
- Inconsistent results: Different users often applied colours or materials differently, leading to visual and data mismatches in design.
- Data management headaches: Keeping component references, material names, and colour codes in sync across configurations required constant manual verification.
- High rework rate: Any model revision or colour scheme change meant redoing assignments from scratch, consuming valuable engineering time.
- Reporting bottlenecks: Preparing CSV or Excel summaries of colour allocations for manufacturing was tedious and error-prone.
- Scalability issues: Expanding to new product lines or customer-specific schemes amplified these challenges, making manual processes unsustainable.
- Limited traceability: Without automation, it was difficult to track which configurations used which colour sets, causing confusion during quality checks or audits.
The Solution
- Automates door colour assignment across SolidWorks assemblies using predefined rules, taking input from a CSV and ColourScheme.txt.
- Applies scheme-specific logic to ensure accurate upper, lower, and feature-wall colour mapping.
- Updates component references and synchronizes colour data across all configurations automatically.
- Generates a CSV summary log for quick verification.
Implementation Flow
- Initialization: The macro starts with the root assembly (.sldasm) open in SolidWorks and verifies the chassis number and model name.
- Data Import: Reads the Colour Scheme, Upper and Lower Door part number list, and Feature-Wall NX codes from the input CSV and ColourScheme.txt.
- Automated Colour Assignment:
- Assigns Colour-1 to assemblies marked as upper doors.
- Applies Colour-2 to remaining assemblies.
- Detects feature-wall parts (thickness = 16 mm) and assigns Colour-3, embedding the correct NX code in each component reference.
- Reporting: Automatically creates a CSV summary capturing the final colour mapping for each assembly and configuration.
Business Impact
- Drastically reduced manual time spent on door colour assignment across multiple assemblies and configurations.
- Enhanced accuracy and consistency in colour assignments, minimizing costly errors downstream.
- Automated CSV reporting simplified auditing and verification.
- Freed engineering resources to focus on higher-value activities rather than repetitive manual updates.
By deploying this macro, the caravan manufacturer significantly improved throughput and quality in door assembly design, demonstrating the impact of targeted SolidWorks automation in manufacturing customization.