I'm a newbie at Vegas scripting and trying to create a script to automate the "snapshot photo effect" that I've read about on the Vegas forum.  The first step is to add a velocity envelope to the current track.  Easy enough... but for some reason the below snippet is failing:
 var velocityEnvelope = new Envelope(EnvelopeType.Velocity);
 track.Envelopes.Add(velocityEnvelope);
It throws "Error: bad envelope type".  Any ideas what I'm doing wrong?
Thanks!