ContAdd

Creates a new continuous variable with values contVar[i]+numberToAdd, returns a reference to the new variable.

Syntax

ContAdd(contVar, numberToAdd)

Parameters

Parameter

Type

Description

contVar

variableReference

Reference to the variable.

numberToAdd

number

The number to add to each value of the contVar

Return

Creates a new continuous variable with values contVar[i]+numberToAdd, returns a reference to the new variable.

Examples

Python

import nex
doc = nex.GetActiveDocument()
baseLine = 10.0
doc["subtractedBaseLine"] = nex.ContAdd(doc["FP01"], -baseLine)

# you can also use arithmetic operations on continuous variables:
doc["subtractedBaseLine"] = doc["FP01"] - baseLine

doc["average of FP01 and FP02"] = ( doc["FP01"] + doc["FP02"] ) / 2

NexScript

doc = GetActiveDocument()
baseLine = 10.0
doc["subtractedBaseLine"] = ContAdd(doc["FP01"], -baseLine)