Anyone got any ideas? I still can't seem to get this working, in a nutshell I just want the highlighting to work as it does in the Model browser, when you hover over an item in the model browser it highlights it in the assembly even if its within a sub-assembly...
If anyone is interested (or facing the same issue) I've figured out the answer. You need to add component occurence proxy objects to the highlightset not the sub component occurence objects themselves. This can be done by first returning the component occurences from the root assembly then returning the suboccurences from those.
Dim topHighlightSet As Inventor.highlightSet
Public Sub Highlight()
Dim topLevel As Inventor.AssemblyDocument
Dim subAssy As Inventor.ComponentOccurrence
Dim childPart1Occurence As Inventor.ComponentOccurrenceProxy
Set topLevel = ThisApplication.ActiveDocument
Set subAssy = topLevel.ComponentDefinition.Occurrences.Item(1)
Set childPart1Occurence = subAssy.SubOccurrences(1)
Set topHighlightSet = topLevel.CreateHighlightSet()
topHighlightSet.Color = ThisApplication.TransientObjects.CreateColor(255, 255, 255)
topHighlightSet.Color.Opacity = 0.8