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
Next revision Both sides next revision
howtos:toolcoding:subroutinepackage [2012/02/08 21:55]
shona.weldon
howtos:toolcoding:subroutinepackage [2013/02/20 17:26]
marcus.williams
Line 1: Line 1:
 ====== Subroutine Package ====== ====== Subroutine Package ======
-From here you can download a set of sub-routines ​that can be put in your Vx/views directory.  ​They can then then be loaded ​using the informants window ​and once in your model any view can call the sub routines.+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.  
 + 
 +This is the subroutine package that should be unzipped in your model account directory. ​ Something like /​models/​myModel/​Vx/​views to create a subdirectory called subroutines.
  
-This is the subroutine package that should be unzipped in your model'​s Vx/views 
 {{:​howtos:​toolcoding:​subroutines.zip|}} {{:​howtos:​toolcoding:​subroutines.zip|}}
 +
 +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/​subroutines for the most current subroutines and under there find TemplateExamples for the most up to date templates.
 +
 ===== Setup of installed files ===== ===== Setup of installed files =====
 Once you have extracted the files there are 3 files you must copy and adjust for your current model/​version Once you have extracted the files there are 3 files you must copy and adjust for your current model/​version
Line 22: Line 30:
   * copy this file and rename it to: informs.samm   * copy this file and rename it to: informs.samm
   * edit the file and adjust the path to the subroutines directory in the "​setpath"​ line of the file   * edit the file and adjust the path to the subroutines directory in the "​setpath"​ line of the file
 +
  
 ===== Loading subroutines ===== ===== Loading subroutines =====
howtos/toolcoding/subroutinepackage.txt · Last modified: 2013/06/04 12:38 by shona.weldon