Jollyto,
There is no global variable in TestStand that keeps track of the current Sequence Context. However, even if you aren't passing a direct reference to the sequence context to your code module, if you are passing almost any reference to a TestStand object, then you can use the TestStand API on that object to get a reference to the sequence context. These methods are documented in the TestStand Help and there is also a flow chart that describes how each TestStand object relates to the other TestStand objects. You can find this chart in the TestStand Help under the title "Using TestStand API Objects". Simply type that in the Index. In the chart, any time you see an arrow connecting one object to another, you'll call the TestStand API to get a reference to t
hat next object type using the object that you already have a reference to as the starting point. In the help in TestStand 3.0, you can even click on the objects shown in the chart and it will take you directly to the documentation about that TestStand object.
Hope that helps!
Regards,
Shannon R.
Applications Engineer
National Instruments