I'm trying this:
------------------------------------------------------------
import System.Windows.Forms;
import SonicFoundry.Vegas.Script;
var markerEnum = new Enumerator(Vegas.Project.CDTracks);
if (markerEnum.atEnd())
{
MessageBox.Show("There are no markers in this project.");
}
else
{
while (!markerEnum.atEnd())
{
var marker = markerEnum.item();
var output = "";
output += "Marker Index:\t" + marker.Index + "\n";
output += "Label:\t\t" + marker.Label + "\n";
output += "Position:\t\t" + marker.Position + "\n";
MessageBox.Show(output);
markerEnum.moveNext();
}
}
-----------------------------------------------------------------
But I only get the properties for the first track. If I have two tracks it shows the first track two times.
If I change this line
var markerEnum = new Enumerator(Vegas.Project.CDTracks);
to
var markerEnum = new Enumerator(Vegas.Project.Markers);
I can iterate through all the markers without a problem.
Any ideas on how to get all the track markers?
------------------------------------------------------------
import System.Windows.Forms;
import SonicFoundry.Vegas.Script;
var markerEnum = new Enumerator(Vegas.Project.CDTracks);
if (markerEnum.atEnd())
{
MessageBox.Show("There are no markers in this project.");
}
else
{
while (!markerEnum.atEnd())
{
var marker = markerEnum.item();
var output = "";
output += "Marker Index:\t" + marker.Index + "\n";
output += "Label:\t\t" + marker.Label + "\n";
output += "Position:\t\t" + marker.Position + "\n";
MessageBox.Show(output);
markerEnum.moveNext();
}
}
-----------------------------------------------------------------
But I only get the properties for the first track. If I have two tracks it shows the first track two times.
If I change this line
var markerEnum = new Enumerator(Vegas.Project.CDTracks);
to
var markerEnum = new Enumerator(Vegas.Project.Markers);
I can iterate through all the markers without a problem.
Any ideas on how to get all the track markers?