Community Forums Archive

Go Back

Subject:Check Existance of untitled regions?
Posted by: Kit
Date:4/18/2014 7:15:03 PM

What's the easiest way to check if any regions are Untitled? Thanks

Subject:RE: Check Existance of untitled regions?
Reply by: Kit
Date:4/19/2014 8:43:44 PM

This seems to work:

	long countRegions = 0;
long countMissing = 0;

foreach (SfAudioMarker mk in file.Markers)
countRegions ++;
if (mk.Name == "")
countMissing ++;

if (countRegions == countMissing)
MessageBox.Show("All " + countMissing + " regions without names", "Oops!, Name Some Regions");
return "This File Contains no named regions!";

Go Back