下载app免费领取会员
来源:古锐科技 梁筱璇
在设计较为复杂装配体的过程中,尤其是包含相同螺栓的钣金装配体,可以通过简易版BOM表来查看和核对物料信息。下面将介绍一种处于装配环境下编写iLogic来生成简易BOM表的方法:
1、打开“管理”选项卡,在iLogic板块中点击“添加规则”并修改规则名称。

2、在编辑栏里输入以下规则:

Dim oDoc As Document = ThisApplication.ActiveDocument
If oDoc.DocumentType<> DocumentTypeEnum.kAssemblyDocumentObject ThenExit Sub
Dim oADO As Inventor.ComponentOccurrences= oDoc.ComponentDefinition.Occurrences
Dim ES As String = vbNullString
For Each aDoc As Document In oDoc.AllReferencedDocuments
Dim sFN As String = aDoc.FullFileName
Dim Amount As Integer = oADO.AllReferencedOccurrences(aDoc).Count
Dim oPropsets As PropertySets = aDoc.PropertySets
Dim oPropSet As PropertySet = oPropsets.Item("{32853F0F-3444-11D1-9E93-0060B03C1CA6}")
Dim PN As String = oPropSet("Part Number").Expression
If ES <> vbNullStringThen ES += vbNewLine
ES += PN & " "& CStr(Amount)
Next
MsgBox(ES)
3、点击保存并运行。

转载请注明来源本文地址:https://www.tuituisoft/bim/24140.html
上一篇:没有了
下一篇:没有了