Equation in BOM

Hi SW Community,

I am currently creating a macro for BOM.

And I have this problem on how to create equation.

As you can see below, I need to sum up the total weight of each part.

Does anyone knows how to do this?

Thank you in advance.

Regards,

DiAnne

SolidworksApi macros