Hole wizard API parameter mess

I've been struggling with the Hole Wizard API last night. I started by reading the documentation. It is lengthy, but not complete or clear. The HoleWizard5 function has 27 parameter, but the function of each variable depends on the hole type that you create. That's a disaster waiting to happen in and by itself.

2015 SOLIDWORKS API Help - HoleWizard5 Method (IFeatureManager)

I have recorded tens of hole creations where HoleWizard5 is being used. But when I play the macro afterwards, the result is a different hole.

My method was this: (using SW 2017 Sp2)

  • Select a flat face so it has a point and face for the hole
  • Record the macro while adding this hole
    • Straight Tap, ISO, Tapped Hole, M10, Through all, Through all, center thread callout option "Cosmetic thread", With Thread callout enabled, Near side countersink diameter 11mm, angle 90 degrees
  • Open the macro and delete all the code where a point is created. Leave only the HoleWizard5 line and variable declarations
  • Select a face again
  • Run the macro

The result is a different hole, not with a countersink but with a blind thread depth of 11mm. If the code itself can't figure out how to use this function, how can i?

Now my questions are:

  • Do you see the same behavior when you follow these steps?
  • Has anyone gotten the hang of using this function? How?
SolidworksApi macros