User Tools

Site Tools


howtos:toolcoding:subroutinepackage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:toolcoding:subroutinepackage [2012/02/08 22:05]
shona.weldon
howtos:toolcoding:subroutinepackage [2013/06/04 12:38] (current)
shona.weldon
Line 2: Line 2:
 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. 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. ​Below is a .zip file which is a package of files to get you started and the rest of this article describes how to use them. +We have developed a set of subroutines you can use as a starting point. ​ ​Please contact your whatIf? support person ​to get the package
  
-This is the subroutine package that should be unzipped in your model account directory.  ​Something like /​models/​myModel/​Vx/​views to create ​subdirectory called subroutines.+Please consider these **use at your own risk**.  ​We are not supporting them but are just providing them as starting point from which you can modify them as you wish!
  
-{{:​howtos:​toolcoding:​subroutines.zip|}} +**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.
- +
-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!+
  
 ===== Setup of installed files ===== ===== Setup of installed files =====
-Once you have extracted the files there are files you must copy and adjust for your current model/​version+Once you have extracted the files there are files you must copy and adjust for your current model/​version
  
 getModelVersion_CopyAndCustomize.t getModelVersion_CopyAndCustomize.t
Line 17: Line 15:
   * copy this file and re-name it to: getModelVersion.t   * copy this file and re-name it to: getModelVersion.t
   * Edit the file and adjust the version number   * Edit the file and adjust the version number
- 
-getProjectNames.t 
-  * This file is used to manage the names of various projects which might be running out of this model 
-  * For now the only thing it is used for is makeing export directories for each project and is related to the getProjectExportPath.t subroutine 
-  * copy this file and re-name it to: getProjectNames.t 
-  * edit the file and adjust the project names 
  
 informs_CopyAndCustomize.samm informs_CopyAndCustomize.samm
Line 37: Line 29:
  
 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. 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 ===== ===== Examples =====
  
-In that new folder you will find an examples ​sub folder with some example views:+In that new folder you will find an TemplateViews ​sub folder with some example views:
  
-levelVarProjection.t+levelVarProjection_<​verson>​.t
   * This type of view projects a variable which holds variables which are not share variables, like rates or efficiency levels etc   * This type of view projects a variable which holds variables which are not share variables, like rates or efficiency levels etc
   * It gives several different ways to project this variable through a menu command   * It gives several different ways to project this variable through a menu command
howtos/toolcoding/subroutinepackage.1328738731.txt.gz · Last modified: 2012/02/08 22:05 by shona.weldon