How to use codes to open the AcccuDraw

I inherited the class of DgnPrimitiveTool ,  my aim is to use this tool class to draw a line,

in the mouse click event - _OnDataButton , write the codes.

first:  how to open the AccuDraw use codes , when I draw the line , both  before and  after I click the mouse ,I need the AccuDraw to take effect  .   

second: how to use the  AccuDraw to set direction , example lock x axis.

supplements: we can open the AccuDraw by shortcut F11 and O