Quantity pattern components in assembly Document Manager API

Hello,

I would like to get the quantity of pattern components in an assembly with Document Manager API.

I first idea was to dissolve the pattern to be able to get the quantity with GetComponentCount but it seems only possible with Solidworks API.

Could you please help me to find a solution?

Thanks

SolidworksApi macros