Competition forces manufacturing systems to be flexible and to increase product variety and process complexity. These tasks depend on the flexible design of a bill of materials (BOM), one of the most important inputs in manufacturing planning and control systems. Product variety forces systems to generate BOMs with regard to product properties through a BOM pattern. A variant bill of materials provides a structure to manage product variability. In this study, an algorithm is designed to build a BOM pattern using computer-aided design and computer-aided manufacturing (CAD/CAM) data, and another algorithm is designed to generate variants with regard to product specifications. Genetic algorithm is used to generate new products to provide high product variability for testing algorithms. After the test, both algorithms are applied to a real industry problem. The BOM pattern is built automatically using CAD/CAM data, and variants are generated with regard to the pattern, and the results are discussed. (C) 2014 Elsevier Ltd. All rights reserved.