BOMView.Export method not outputing any file.
Not applicable
05-22-2018
07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I am trying to export Bom from an assembly using API. on most Assemblies it works fine but some times method don't generate any output file. if I manually export bom by opening assembly in inventor it works fine but through API its not exporting any file.
I don't get any exception or error just no export file.
I am using External application to launch inventor silently then open document and export BOM.
here is code I am using to export BOM.
if (document.DocumentType == DocumentTypeEnum.kAssemblyDocumentObject)
{
var assemblyDoc = (AssemblyDocument) document;
var bom = assemblyDoc.ComponentDefinition.BOM;
bom.StructuredViewFirstLevelOnly = true;
bom.StructuredViewEnabled = true;
if (System.IO.File.Exists(csvTempFilePath)) System.IO.File.Delete(csvTempFilePat);
var bomView = bom.BOMViews["Structured"];
bomView.Export(csvTempFilePath, FileFormatEnum.kTextFileTabDelimitedFormat);
}
Why export don't work for some assemblies any help?
Thanks
