Looping through 'Event' in a NX.CAE Response simulation - How to?

To all,

I am contemplating a macro/journal to extract specific results data from a response simulation with multiple events. The 1st step (building blocks) is to figure out how to loop through a unknown number of events defined in a response simulation. Assuming the following;

1. the user specified which Response Simulation is to be processed, let's call it 'RespSim1'
2. the program needs to figure out how many events exists in exist (are defined) in 'RespSim1' and then loop through them

Dim Nevent as integer
Nevent=GetEventinRespSim1

For i = 1 to Nevent
'do something
Next i

The 'do something' in hte loop is potentially another headache but one thing at the time

Any ideas/suggestions, etc are welcome

Thanks

Regards

JXB