How to get SketchupTool activated by an option click

I have given an option in extensions, where on click of it, a dialog box opens. Along with it, pencil tool(SketchTool) should also be activated. User should be able to draw edges using that option.
I am unable to get the sketchtool activated via ruby. Need help

Sketchup.send_action(CMD_FREEHAND)

Now I see the constants listed at:

Now CMD_FREEHAND is assigned the integer 21031. Integer arguments are Windows only according to:

According to the API, the argument “selectFreehandTool:” (text string) should work for both.

thanks!