VBA/Macro: Loop through pattern components

We are trying to loop through all components of a pattern (chain pattern) in order to suppress every 5th (or rather n-th) component of that pattern.

Is it possible to loop through a selected pattern?

SolidworksApi/macros