GetTemplateParValue

Returns the value of the specified template parameter as string.

Syntax

GetTemplateParValue(templateName, paramName)

Parameters

Parameter

Type

Description

templateName

string

The name of the template. See How To Specify Template Names for details on how to specify template name parameter

paramName

string

The name of the parameter

Return

Returns the value of the specified template parameter as string.

Note

The parameter name should be specified exactly as it is shown in the left column of the Properties Panel.

For example, to get the bin value in the Rate Histograms template, you need to write:

valueAsString = GetTemplateParValue("Rate Histograms", "Bin (sec)")

Note that parameter name is not “Bin”, but “Bin (sec)”. You can select the parameter name in the left column of the Properties Panel and press Ctrl+C to copy the parameter name to the clipboard. Then, paste the name of the parameter into your script.

If you need to use a numeric value of the parameter, you need to convert the string to number using StrToNum function.

Examples

Python

import nex
valueAsString = nex.GetTemplateParValue("Autocorrelograms", "Bin (sec)")