07-19-2021
02:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
07-19-2021
02:09 PM
oke that makes more sense ;-). But even if your parameter is zero the pattern will remember the last correct value. Therefore counting the number of elements will not help you. Instead, you can check the health status of the pattern. (I discovered that you need to update your assembly before checking or it will not give a correct value.)
Also suppressing the pattern is not as easy as I would like. but anyway try this.
Dim doc As AssemblyDocument = ThisDoc.Document doc.Update() For Each pat As OccurrencePattern In doc.ComponentDefinition.OccurrencePatterns If (pat.HealthStatus <> HealthStatusEnum.kUpToDateHealth) Then For Each occElement As OccurrencePatternElement In pat.OccurrencePatternElements For Each occ As ComponentOccurrence In occElement.Occurrences occ.Suppress() Next Next End If Next
Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Blog: hjalte.nl - github.com