2.5D snaping like 3DMAX

Hi,

Im really newbie on scripting, i have learned python for a while but not deeple.
So i wanted to make an script to go deep on it.

Im trying to make a “lock” of the constraint_axis option transform_translation has.
The idea is when you are en an ortho view for example TOP, enabling the script you got constraint_axis =(True,True,False), the same you got pressing SHIFT+Z. The same on the other views making false the axis perpendicular to the view.

The problem is I cant get this to work, i dont know exactly on wich context i should do this… I tried firs with TOP and didnt get any good resul, the script runs… but nothing happends.

If some one can give me a clue will be great!

Cheers,
Patricio.