weldment cutlist quantities

I've been searching for a way to get cutlist quantities, seems like there isn't an easy way to do it.  Then I ran accross this example macro on api help.

http://help.solidworks.com/2010/English/api/sldworksapi/get_solid_bodies_from_cut-list_folders_and_get_custom_properties_example_vb.htm

Somehow this macro can count cutlist quantities.  Its really complicated and I'm still trying to understand.

After I come to understand how it works, and strip out all the gak, I hope I can use it to help sync weldments with our ERP.

SolidworksApi macros