Lock a sequencer from virtual sequence

In reply to adityaprasad123:

In reply to cgales:
I tried with
p_sequencer.seqr.lock( this ); // Lock the sub-sequencer by ‘this’ sequence
but still, it is not working. Could you please help?

Dou know this example

Please try it and compare with your approach.