iLogic to 'Enable Row Merge on Part Number Match' in .idw Drawing

iLogic to 'Enable Row Merge on Part Number Match' in .idw Drawing

Anonymous
Not applicable
617 Views
2 Replies
Message 1 of 3

iLogic to 'Enable Row Merge on Part Number Match' in .idw Drawing

Anonymous
Not applicable

I have my ilogic code that can extract the Part List out to a .txt file in Drawing Mode not in Assembly,

before doing that, I need to merge all the same parts, and I have to manually do Enable Row Merge every single time...

I tried imply this code into my ilogic, but it doesn't work, can someone please help me?

 

Dim oDoc As Document

oDoc = ThisDoc.Document

For each oSubDoc in oDoc.AllReferencedDocuments

Try Dim oCD As AssemblyComponentDefinition

oCD = oDoc.ComponentDefinition oBOM = oCD.BOM

oBOM.SetPartNumberMergeSettings(True)

Catch

End Try

Next

 

 

0 Likes
618 Views
2 Replies
Replies (2)
Message 2 of 3

FINET_Laurent
Advisor
Advisor

Morning,

 

oSubDoc is not declared anywhere..

 

Regards,

FINET L.

If this post solved your question, please kindly mark it as "Solution"

If this post helped out in any way to solve your question, please drop a "Like"

@LinkedIn     @JohnCockerill

0 Likes
Message 3 of 3

Tony_Yates
Advocate
Advocate

Hi,

 

Try this:-

' Get the active application
Dim oInvApp As Application
oInvApp = ThisApplication

' Get the active document
' This code assumes it's an assembly document
Dim oDoc As AssemblyDocument
oDoc = oInvApp.ActiveDocument

' Get the BOM object
Dim oBom As BOM
oBom = oDoc.ComponentDefinition.BOM


'Dim sList() As String
Dim booleanParam As Boolean


' Set the Row Merge Settings
oBom.SetPartNumberMergeSettings(True)'(booleanParam, sKeys)

 

 

0 Likes