Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BOM extract to array

1 REPLY 1
Reply
Message 1 of 2
Anonymous
423 Views, 1 Reply

BOM extract to array

I've been trying to Sorting the Bom List                   as Fig.Shows below

Now I want to Extract Array e.g. Item[ CountedRows], PartNumber[]...

I've Checked the admapi.chm couldn't get more hints

 

If you got any clue Welcome to discuss it !Smiley Happy

 

Sub Main()

Dim oAsmDoc As AssemblyDocument
Dim oAsmCompDef As AssemblyComponentDefinition
Dim oBOMView As BOMView

oAsmDoc = ThisDoc.Document
oAsmCompDef = oAsmDoc.ComponentDefinition

Try
	oBOMView = oAsmCompDef.BOM.BOMViews.Item("Structured")
Catch
	oAsmCompDef.BOM.StructuredViewEnabled = True
	oBOMView = oAsmCompDef.BOM.BOMViews.Item("Structured")
End Try
Try
	oBOMView.Sort("物料清单类型(First Field)", True, "Part Number", True ,)
	oBOMView.Renumber()
Catch
	MsgBox("Missing Fields, Fix it!(inner-line 83126)", vbOKOnly, "Error")
	Exit Sub
End Try

End Sub
Tags (3)
1 REPLY 1
Message 2 of 2
Yijiang.Cai
in reply to: Anonymous

You could define a variable for the arraylist, and use the loop to get all the bomrows, then get all the content related to part number etc.

Thanks,
River Cai

Inventor Quality Assurance Team
Autodesk, Inc.
Email: River-Yijiang.Cai@autodesk.com

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Technology Administrators


Autodesk Design & Make Report