How to get EPDM computed bom with latest mode by not as-built?

How to get EPDM computed bom with latest mode by not as-built

SolidworksApi macros