I need to create API or recorded macro to create hole using Hole wizard.
I have recorded some macros, but its not working.
How to include selection box in API?
Those are two separate questions, I presume? As you have noticed, the macro recorder does not record all user actions.
SolidWorks has a good API help (better than the API itself I think) and here is the first example that I found:
2015 SOLIDWORKS API Help - Create Hole Wizard Feature Data Object and Hole Wizard Feature Example (VBA)
You can add a standard selection box on a VBA form. To mimic all the hole wizard settings, I think you'll have to spend a lot more time. I think you would have to couple items in your selection box to hole types. As you can see in the enums that are used for the various hole wizard functions.
I think i got some idea with your reply.
Retrieving data ...