public void UpdateRecorders(RecordingInstructions ri) { Log("Updating recorders"); ProjectViewTable table = Scenario.ProjectViewTable(); foreach (string s in ri.RecordNone) { Log("OFF: " + s); SwitchRecording(ri.Parse(s), false); } foreach (string s in ri.RecordAll) { Log("ON: " + s); SwitchRecording(ri.Parse(s), true); } }
public TimeSeries GetRecorded( string variableName ) { // The name of the element|PropertyNameOfTheElement var specification = variableName.Split('|'); var elementUniqueName = specification[0]; var elementPropertyName = specification[1]; object uniqueElement = findElement( elementUniqueName ); TimeSeries result = null; ProjectViewTable projectViewTable = Scenario.Project.ResultManager.AllRuns( ).FirstOrDefault( ).RunParameters; Dictionary<ProjectViewRow.RecorderFields, object> searchCriteria = new Dictionary<ProjectViewRow.RecorderFields, object>( ); searchCriteria.Add( ProjectViewRow.RecorderFields.NetworkElementReference, uniqueElement ); searchCriteria.Add( ProjectViewRow.RecorderFields.ElementName, elementPropertyName ); IList<ProjectViewRow> rows = projectViewTable.Select( searchCriteria ); Dictionary<AttributeRecordingState, TimeSeries> resultList = rows[0].ElementRecorder.GetResultList( ); foreach( AttributeRecordingState key in resultList.Keys ) { result = resultList[key]; break; } return result; }