Ilogic to toggle tick box

Ilogic to toggle tick box

Anonymous
Not applicable
525 Views
2 Replies
Message 1 of 3

Ilogic to toggle tick box

Anonymous
Not applicable

Hi Everyone

 

I'm after some help with some Ilogic. What I want to do is turn and off the "Enable Row Merge on Part Number Match" tick box on in the assembly Bill of Materials with some Ilogic?

 

Thanks

 

 

0 Likes
Accepted solutions (1)
526 Views
2 Replies
Replies (2)
Message 2 of 3

Jef_E
Collaborator
Collaborator
Accepted solution

Do you mean something like 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

' Set the keys for row merging
Dim sKeys(1) As String
sKeys(0) = "Part1"
sKeys(1) = "Part2"

'Dim sList() As String
Dim booleanParam As Boolean
'Call oBom.GetPartNumberMergeSettings(booleanParam, sList)

booleanParam = InputRadioBox("Check", "MergeSetting ON", "MergeSetting OFF", booleanParam, Title := "Row merge setting")

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

If you want to edit the keys for merging, you should edit this code. When adding a key also raise the array size. (1) is enough for 2 values because it's zero based.

' Set the keys for row merging
Dim sKeys(1) As String
sKeys(0) = "Part1"
sKeys(1) = "Part2"


Please kudo if this post was helpfull
Please accept as solution if your problem was solved

Inventor 2014 SP2
Message 3 of 3

Anonymous
Not applicable

Hi Jef

 

Thanks for the help, works great 

 

Thanks

0 Likes