Table of Contents

Subroutine Package

Subroutines are reusable code files that can be called from views. The advantage of using them is there is only one copy of common code which makes it more maintainable and also gives consistency to how you interact with your views.

We have developed a set of subroutines you can use as a starting point. Please contact your whatIf? support person to get the package

Please consider these use at your own risk. We are not supporting them but are just providing them as a starting point from which you can modify them as you wish!

whatIf? Team members: Please look in /models/caness/V5/views/subroutines for the most current subroutines and under there find TemplateExamples for the most up to date templates.

Setup of installed files

Once you have extracted the files there are 2 files you must copy and adjust for your current model/version

getModelVersion_CopyAndCustomize.t

informs_CopyAndCustomize.samm

Loading subroutines

Sub-routines are only available to views running in SAMM once the are loaded into the model family. Here's how to do that.

Now you are ready to write views that use subroutines. See below info about the examples that are a part of the sub routine bundle you have downloaded and extracted.

Examples

In that new folder you will find an TemplateViews sub folder with some example views:

levelVarProjection_<verson>.t

shareVarProjection.t

usingGetModelVersion.t