Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to divide a pattern into sections by suppressing every n-th element , but when changing parameter "a" I get this error message.
The rule I use:
'Suppresing n-th element 'a - number of elements in pattern 'b - number of sections Dim n As Integer = a/b Dim oDef As AssemblyComponentDefinition = ThisApplication.ActiveDocument.ComponentDefinition Dim oPattern As OccurrencePattern = oDef.OccurrencePatterns.Item("Component Pattern 1:1") For Each oElement As OccurrencePatternElement In oPattern.OccurrencePatternElements oElement.Suppressed = False If oElement.Index Mod n = 0 Then oElement.Suppressed = True End If Next
Solved! Go to Solution.