PutPar()

Put a parameter of the defined types in the data base.

Usage

PutPar( path, par,
                 value, parType = None,
                 clobber = True, **opts )

Parameters

path (string)
Data base path of the node containing the parameter.
par (string)
Parameter name.
value (depends on par type)
The parameter value.
parType (data base defined type ((boolean), (integer), and so on)
The parameter type.
clobber (boolean)
The parameter value will be overwritten if clobber is true.
**opts (list)
List of options.

Return Value

None

Error

The parameter must be in accordance with parType.

Description

This routine saves a parameter in the data base. The parameter address is given by its node path and the par name. The type and value of parameter is given by type and value. If the clobber is true, the parameter value will be overwritten. For example,
gNode = ROOT + RS + 'GLOBAL_MESH_ATTRIBUTES'
childPars = GetPars( gNode )
pVals = {}
for cPar in childPars:
 pType = GetParType( cPar, gNode )
 pVal = GetPar( gNode,cPar, pType )
 pVals[cPar]= ( pType, pVal )
 PutPar( gNode, cPar, pVal, pType, True )