In [1]:
import veneer
from veneer.manage import *

In [5]:
v = veneer.Veneer()

In [6]:
v.functions()


Out[6]:
[{'Expression': '1.0', 'Name': '$InflowScaling'}, {'Expression': '$InflowScaling*$CrabTS', 'Name': '$CrabScaled'}, {'Expression': '$InflowScaling*$FishTS', 'Name': '$FishScaled'}, {'Expression': '$InflowScaling*$ShellTS', 'Name': '$ShellScaled'}, {'Expression': 'lookup($PatternPW,$Now.DayOfYear)', 'Name': '$MinFlow'}]

In [7]:
help(v.model.functions.get_options)


Help on method get_options in module veneer.server_side:

get_options(option, functions=None) method of veneer.server_side.VeneerFunctionActions instance
    Return the current value of `option` for one or more functions.
    
    option - one of
        'EvaluationTimes'
        'ForceEvaluate'
        'InitialValue'
        'ResultUnit'
        'IsClone'
        'IsConstant' (readonly)
        'Expression'
        'Transient'
        'HasContextVariables' (readonly)
        'CanBeRecorded' (readonly)
        'Name'
        'FullName' (readonly)


In [8]:
v.model.functions.get_options('ForceEvaluate','$InflowScaling')


Out[8]:
[False]

In [9]:
v.model.functions.get_options('EvaluationTimes')


Out[9]:
['StartOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep']

In [10]:
v.model.functions.set_options('ForceEvaluate',True,functions='$InflowScaling')


Out[10]:
True

In [11]:
v.model.functions.get_options('ForceEvaluate')


Out[11]:
[True, False, False, False, False]

In [12]:
v.model.functions.get_options('EvaluationTimes')


Out[12]:
['StartOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep']

In [13]:
v.model.functions.set_time_of_evaluation('EndOfTimeStep',functions='$InflowScaling')


Out[13]:
True

In [14]:
v.model.functions.get_options('EvaluationTimes')


Out[14]:
['EndOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep',
 'StartOfTimeStep']

In [ ]: