How to : Pdm Api perform BOM export to csv ?

Is there a Pdm API call for the export BOM button ?

I have tried the following :

"bomView = (IEdmBomView3)aFile.GetComputedBOM(ppoRetLayout.mbsLayoutName, 0, "@", (int)EdmBomFlag.EdmBf_AsBuilt + (int)EdmBomFlag.EdmBf_ShowSelected);"

But the results are not the same as using the button in Pdm itself.

Any help appreciated,

Thanks.