03-04-2020
08:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
03-04-2020
08:20 AM
I was able to get this error by running your code on an assembly where an occurrence within a component pattern was suppressed. Could that be the issue for you?
If so, you could solve the issue by making sure the suppressed occurrence is not part of a pattern, and if it is, leave it alone. This tweak will do that:
If occ.Suppressed Then If Not occ.IsPatternElement Then occ.Delete End If Else Call DeleteSuppressedComponent(occ.SubOccurrences) End If