it's controlled by the spindle direction (mom_spindle_direction) in the Feeds and speeds dialog. Thru this you get the thread direction of rotation right/left.
These cycles and parameters are in manual with description, etc, for 100%.
Just download some, make cup of tea and study.
One for example, this is what I use:
(dont ask me what is what and why ... )
There is a bunch of bits, and each place changes with different setting of the cycle, such complicated cycle construction. If this parameters/values you generate dont match with real solution on machine control - it could be some syntax error.
So I just make these bits number hardcoded - just copied working cycle, change technological parameters, because for me it was neverending to get 100% fully working cycle (what you set in nx - see in cycle and working.)
You know, It was some years ago, today my approach could be different.
I spent too much time with it, it was time to go on, I had lots of work on other projects.
Normally other controls wants only technological values, depth,clearance, pitch, etc / heidenhain or fanuc, simple,done.
one additional remark: It depends also how the thread was created in modeling. So if the hole is modeled with right Handed than an additional mom-variable is available, named mom_cycle_thread_right_handed. If that is true the output will be 1000. If this variable not exists, e.g. because it's a simple hole or imported from other CAD systems the mom_spindle_direction will be used.