NewIntEvent
Creates a new interval variable.
Syntax
NewIntEvent(doc, count)
Parameters
Parameter |
Type |
Description |
---|---|---|
doc |
documentReference |
Reference to the document. |
count |
number |
Initial number of intervals in the variable. This parameter is optional |
Return
Returns a reference to the new variable.
Note
If initial number of intervals is positive, intervals are initialized with values [0, 0.5], [1, 1.5], etc.
Examples
The following scripts create a new interval variable that has two intervals: from 0 to 100 seconds and from 200 to 300 seconds.
Python
import nex
doc = nex.GetActiveDocument()
doc["MyInterval"] = nex.NewIntEvent(doc)
nex.AddInterval(doc["MyInterval"], 0., 100.)
nex.AddInterval(doc["MyInterval"], 200., 300.)
NexScript
doc = GetActiveDocument()
doc["MyInterval"] = NewIntEvent(doc)
AddInterval(doc["MyInterval"], 0., 100.)
AddInterval(doc["MyInterval"], 200., 300.)