Skip to main content

Add a product

To add a product, use the AddNewProduct method of the IConfigurationModel object. The product is added to the end.

public void AddNewProduct(ICommandContext c, ICommandParams p) 
{
IConfigurationModel configurationModel = c.App.Workspace.CurrentProject.ProductLineModel.ConfigurationModel;

//Add a product with the specified name
configurationModel.AddNewProduct("ACC-0011");
}