Overwriting a sequence

Hello,

I'm using the following code to play a sequence:


ufs.Assem.InitializeSequencing()

Dim iSequence As Integer
Dim tSequence() As NXopen.Tag
ufs.Assem.AskSequencesInPart(workpart.Tag, iSequence, tSequence)
ufs.Assem.ActivateSequence(tSequence(0))
ufs.Assem.PlaybackAnimateToFrame(tSequence(0), 2000,2)
ufs.Assem.PlaybackSeekToFrame(tSequence(0), 0)

ufs.Assem.TerminateSequencing()

The sequence I play is one I captured in the motion simulation animation, so the sequence is the same as my animation. I was wondering if it's possible to create a new sequence if a model is updated.
I've tried using ufs.Assem.CreateSequence() but that only gives me an empty sequence. Is there a way to replace my old sequence with a new one?