Message 1 of 11
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I have assembly file and try to reading BomTable with structured ad first level options.
By the way I want to use custom BomTableFormat with below code:
oBOM.ImportBOMCustomization("C:\EXAMPLE\StansardIAM.xml")
I can read BomRow but I can not get the cell (column) of the each row. Because I need the information cell by cell from custom BOM format.
My Code is:
Dim activeDoc As Document = inv_App.ActiveDocument
' Cast the active document as an assembly document
Dim assemblyDoc As AssemblyDocument = DirectCast(activeDoc, AssemblyDocument)
' Get the Bill of Materials
Dim bom As BOM = assemblyDoc.ComponentDefinition.BOM
'İhtiyaç duyulan bilgiler eklenmiş hali...
bom.ImportBOMCustomization(baslangicKlasor & "\StructuredBOM.xml")
bom.StructuredViewFirstLevelOnly = True
' Make sure that the structured view is enabled.
bom.StructuredViewEnabled = True
Dim bomView As BOMView = bom.BOMViews.Item("Structured")
If bomView Is Nothing Then
MessageBox.Show("The 'Structured' BOM view is not available.", "Error")
'hataliGiris = True
Exit Sub
End If
'Tabloyu okuyor.
For Each row As BOMRow In bomView.BOMRows
Console.WriteLine(row.ItemNumber & " --- " & row.ItemQuantity)
Next
By the way I want to read BomTable from IAM file not IDW.
Regards,
Mucip:)
Solved! Go to Solution.