Variable Pattern does not work with surface features. Need help with a macro.

Asking the community for help in writing a macro that would:

1. Select a bunch of faces or surface bodies F

2. Input an offset distance d and a direction

3. Input how many surface bodies you need as an integer n

4. For i=0 to n-1

          Offset the selected faces F by the distance d + i

5. Thicken all the resulted surface bodies by “d”, with the Merge option off

Many thanks!!!

To simplify item 1, you can select a surface body only.

SolidworksApi macros