Equations in Weldments?

I want to be able to create an equation in a Solidworks weldment, so when I insert the weldment, it'll calculate the total weight.

How can I set that up?

Thanks in advance...

SolidworksGeneral