GetVar

Returns the reference to the specified variable.

Syntax

GetVar(doc, varNumber, varType)

Parameters

Parameter

Type

Description

doc

documentReference

Reference to the document

varNumber

number

1-based variable number within the group specified by varType.

varType

string

Variable type. Should be ‘neuron’, ‘neuronorevent’ , ‘event’, ‘interval’ ‘wave’, ‘popvector’, ‘continuous’, ‘marker’ or ‘all’

Return

Returns the reference to the specified variable.

Examples

Python

import nex
doc = nex.GetActiveDocument()
# get the second event variable
event = nex.GetVar(doc, 2, "event")

NexScript

doc = GetActiveDocument()
% get the second event variable
event = GetVar(doc, 2, "event")