Inserts a record event into the list. Record events are always inserted into the first (main) layer.
Record events can be of type 'Absolute' or 'Approximate' only, thus the field ParentID in the
EventInfo data structure does not apply.
We recomend using the CreateEventFromXml(String, String)
function rather than this function.
Future Event Scheduler support will not be added to this function.
Namespace:
GrassValley.Mseries.ScheduleEditorAssembly: GrassValley.Mseries.ScheduleEditor (in GrassValley.Mseries.ScheduleEditor.dll) Version: 1.0.0.0
Syntax
C# |
---|
string InsertRecordEvent( string uri, Object eventTrigger, Object date, Object timecode, Object tcDuration ) |
Visual Basic (Declaration) |
---|
Function InsertRecordEvent ( _ uri As String, _ eventTrigger As Object, _ date As Object, _ timecode As Object, _ tcDuration As Object _ ) As String |
Visual C++ |
---|
String^ InsertRecordEvent( String^ uri, Object^ eventTrigger, Object^ date, Object^ timecode, Object^ tcDuration ) |
Parameters
- uri
- Type: System..::.String
The new clip's URI. IE: "edl/cmf//local/V:/default/Clip2"
- eventTrigger
- Type: System..::.Object
Type of the event trigger ("Absolute" or "Approximate").
- date
- Type: System..::.Object
The start date. The format is in OleDateTime.
- timecode
- Type: System..::.Object
The start timecode. In UINT or string format ("hh:mm:ss:ff" format with length 11 only).
- tcDuration
- Type: System..::.Object
Duration of the event. In UINT or string format ("hh:mm:ss:ff" format with length 11 only).
Return Value
Event IdRemarks
This function will generate a list change notice of type NoticeInsertEvent.
Examples
CopyC#
//Call helper function CreateIScheduleEditor which creates editor object IScheduleEditor schEditor = CreateIScheduleEditor(); string volume = ""; string bin = ""; //this example uses a Controller to get the current bin and volume and then uses //it again to create a unique clip name. _controller2.GetCurrentBin(ref volume, ref bin); // volume returned will be like "V:", with colon string clip = _controller2.GenerateUniqueName("RecEvent", "_"); string strUri = @"edl/cmf//local/" + volume + @"/" + bin + @"/" + clip; DateTime dur = DateTime.Now.AddSeconds(30); UInt32 tcDuration = ((UInt32)dur.Hour << 24) | ((UInt32)dur.Minute << 16) | ((UInt32)dur.Second << 8); //leaving frames at zero object varEventType = "Absolute"; DateTime date = DateTime.Now; DateTime start = date.AddSeconds(15); // the startTimecode parameter currently expects a timecode mask, which is a UINT type in the format // 0xhhmmssff (hh=hours, mm=minutes, ss=seconds, ff=frames). For example, the value below would be 16:15:00:00 UInt32 startTimecode = ((UInt32)start.Hour << 24) | ((UInt32)start.Minute << 16) | ((UInt32)start.Second << 8); //leaving frames at zero string eventID = schEditor.InsertRecordEvent(strUri, tcDuration, varEventType, date, startTimecode); Console.WriteLine(eventID);