AddInterval

Adds a new interval to the specified interval variable.

Syntax

AddInterval(var, interval_start, interval_end)

Parameters

Parameter

Type

Description

var

variableReference

Reference to the interval variable

interval_start

number

Start of new interval (in seconds)

interval_end

number

End of new interval (in seconds)

Return

None.

Note

The new interval should not overlap with any of the existing intervals of the specified interval variable.

Examples

Python

import nex
doc = nex.GetActiveDocument()
intervalVar = doc["CorrectTrials"]
# add interval [100s,120s]
nex.AddInterval(intervalVar, 100, 120)

NexScript

doc = GetActiveDocument()
intervalVar = doc["CorrectTrials"]
% add interval [100s,120s]
AddInterval(intervalVar, 100, 120)