Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working on an iLogic rule that will automatically click the View > Object Visibility > All Workfeatures button. It will run whenever a document is opened (using event triggers) as long as the document is a part or assembly. I have it to where it will activate the button, but it just currently keeps tuning workfeatures on or off depending on the current state of the button when a file is opened. What I would like it to do is detect if the check mark is not to the button or not and if so run the rule. If the check mark is not there then all workfeatures are already off and there is no need to run the rule. Below is what I already have. Thanks for any and all help!
Sub Main()
Dim invApp As Inventor.Application = ThisApplication
Dim oControlDefs As ControlDefinitions
Dim oControlDef As ControlDefinition
oControlDefs = invApp.CommandManager.ControlDefinitions
For Each oControlDef In oControlDefs
If oControlDef.DisplayName = "All Workfeatures" Then
'MessageBox.Show("Found it")
oControlDef.Execute
end if
Next
End Sub
Solved! Go to Solution.