public TimingGrid GetGrid(string gridName, bool createIfNotFound = true) { // Gets existing track specified by Name if it already exists // Creates it if it does not TimingGrid ret = Sequence.FindTimingGrid(gridName, createIfNotFound); //TimingGrid ret = Sequence.TimingGrids.Find(gridName, MemberType.TimingGrid, true); if (ret == null) { if (createIfNotFound) { // ERROR! Should not ever get here System.Diagnostics.Debugger.Break(); //ret = Sequence.CreateTimingGrid(gridName); //ret.Centiseconds = centiseconds; //Sequence.AddTimingGrid(ret); } } else { // Clear any existing timings from a previous run if (ret.timings.Count > 0) { ret.timings = new List <int>(); } } return(ret); }