BOM Configuration using API

I was wondering if there is a way to configure a BOM using the API.  I am currently using a macro that builds an assembly and modifies the material in the assembly and parts given certain inputs in the macro and outputs a drawing using a master template.  The problem is that the material in the BOM is not updating in the master template, it is staying the default material selection.  I read some other posts and is this a common problem with solidworks? Do u have to delete and create a new BOM to update the material properties or create a specific configuration for each material iteration? I am hoping there is a specific code that i can use to change the configuration of the BOM, but have not had any luck finding this code.

-code in VB

Any help would be greatly appreciated

James

SolidworksApi macros