Here’s the complete solution addressing all three focus areas:
Auto-numbering Configuration:
First, modify your ECO policy to allow manual name assignment during import. Update the policy using MQL:
mod policy "ECO" state "Create"
property "enforce" value "false";
This temporarily disables auto-numbering enforcement. After import, restore it to “true”.
Legacy Data Import Process:
Your MQL import script needs to explicitly set the name and skip auto-numbering:
add bus "ECO" "ECO-10045" "-" policy "ECO" vault "Production";
mod bus "ECO" "ECO-10045" "-"
attribute "Title" "Legacy ECO Migration";
The key is using add bus with the explicit name rather than relying on policy numbering.
MQL Scripting Best Practices:
Before starting your bulk import, reset the number generator to prevent future conflicts:
mod type "ECO" property "next_number" value "20001";
Set this to one above your highest legacy ECO number (if your legacy data goes to ECO-20000). This ensures future auto-generated ECOs won’t collide with imported ones.
Critical Pre-Import Steps:
- Query existing ECOs to identify any number conflicts: `temp query bus “ECO” “ECO-*” “-” select name dump |;
- Backup your database before the import
- Test the import process on a small batch (50-100 records) first
- Verify the number generator state after test import
- Document the highest legacy ECO number for generator reset
Post-Import Validation:
After completing the import, verify data integrity by checking that all legacy ECOs were created and the number generator is properly positioned. Run a count query to confirm the expected number of records were imported successfully.
The combination of disabling enforcement, explicit name setting in MQL, and proper generator reset should resolve your duplicate number errors while preserving legacy ECO numbers exactly as needed.
This draft is based on general ENOVIA knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.