Hi,
I was trying to make an iLogic rule that would let me export BOM to excel, but every code i tried resulted in an error.
I even tried to run it with iLogic original sniplet :
ThisBOM.Export("Parts Only", "fileName", kMicrosoftExcelFormat) 'kMicrosoftAccessFormat = Microsoft Access 'kMicrosoftExcelFormat = Microsoft Excel 'kdBASEIIIFormat = dBASE III 'kdBASEIVFormat = dBASE IV 'kTextFileTabDelimitedFormat = Text File Tab Delimited 'kTextFileCommaDelimitedFormat = Text File Comma Delimited 'kUnicodeTextFileTabDelimitedFormat = Unicode Text File Tab Delimited 'kUnicodeTextFileCommaDelimitedFormat = Unicode Text File Comma Delimited
But i got an error too.
I get either this one:
or this one:
I searched this forum and the internet for help but i couldnt find anything that would let me solve the issue.
I am using Inventor Professional 2022.
Solved! Go to Solution.
Solved by Ralf_Krieg. Go to Solution.
Hello
Can't translate the error messages, bu you should at least be sure that the parts only view is enabled before export. And you don't have "filename" in your rule as posted? There you must fill in the full path of your target Excel file.
Dim oDoc As AssemblyDocument = ThisDoc.Document
Dim oBOM As BOM = oDoc.ComponentDefinition.BOM
oBOM.PartsOnlyViewEnabled=True
ThisBOM.Export("Parts Only", "C:\Temp\TestBOMExport.xls", FileFormatEnum.kMicrosoftExcelFormat)
Can't find what you're looking for? Ask the community or share your knowledge.