OK. I need to further clarify before doing more coding.
Within this image, it appears that you intend to have every Item Number be exactly the same as the Part Number on the same row.
Correct. But only for assemblies and a ON/OFF function would be nice. so that we can revert back to normal item numbers if needed, like a I described in the previous message
Do you want both the Part Number & the Item Number edited to make this happen? Both can be edited within the BOM, but I don't know if this may cause you problems later or not.
Only Item number. It's for ERP purpose, but we can't use the part number column
Is each line item's Part Number already exactly the same as its File Name, before any code is ran?
Yes. It's for layout purpose, which means that we do not use are normal item number structure
If you just want the Item Number of each Row to be exactly the same as that Row's Part Number, and there were multiple line items with the same part number, you'd have to add something to the end of the item number, or it will give an error and not work. Each line item within the BOM must have a unique Item Number.
All assemblies will have a unique filename, so that no doublets should occur