The number of holes and slots

Number of holes

Number of slot

It has done with macros?

SolidworksApi macros