EPDM API : BOM Details Extraction

Hi,

I have an error ("Object reference not set to an instance of an object") when trying to extract the BOM details of a specific assembly. I have used the code from the SolidWorks API on this website.

I followed all the instructions from the link below but the code is failing on this line (See yellow highlight in pic below).

http://help.solidworks.com/2014/english/api/epdmapi/access_bill_of_materials_example_csharp.htm#Form1.cs

It fails when trying to load bom details into the “bomView” object which is of type “IEdmBomView”. I created the bom export file (00000011.SLDASM.1.BOM) with the default configuration also. What am I missing?

SolidworksApi macros