03-14-2022
03:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-14-2022
03:47 AM
Hi @Noah.ClarkX5FEF
I experienced the same thing when I was writing one of my VBA macros. Couldn't find anything about this specific behavior with patterned items.
I ended up creating a class that handles the selection process which actually uses the kAssemblyLeafOccurrenceFilter as filter setting and 'travels up' to find the highest sub-assembly level containing the selected component occurrence.
'Check if the selected occurrence is in a sub assembly
If oOcc.OccurrencePath.Count > 1 Then
'Get the highest sub assembly containing it
Do Until oOcc.OccurrencePath.Count = 1
Set oOcc = oOcc.ContainingOccurrence
Loop
End If