GetVarCount
Returns the number of variables of the specified type in the file.
Syntax
GetVarCount(doc, varType)
Parameters
Parameter |
Type |
Description |
---|---|---|
doc |
documentReference |
Reference to the document. |
varType |
string |
Variable type. Should be ‘neuron’, ‘neuronorevent’ , ‘event’, ‘interval’ ‘wave’, ‘popvector’, ‘continuous’, ‘marker’ or ‘all’ |
Return
Returns the number of variables of the specified type in the file.
Examples
Python
import nex
doc = nex.GetActiveDocument()
# get the number of continuous variables
numContVars = nex.GetVarCount(doc, "continuous")
NexScript
doc = GetActiveDocument()
% get the number of continuous variables
numContVars = GetVarCount(doc, "continuous")