This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
howtos:update_code_diagram [2009/11/05 19:06] marcus.williams created |
howtos:update_code_diagram [2011/10/07 18:16] (current) shona.weldon |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | There are times during model shakedown / debugging when it is useful to modify some model code without having to go through the full model reload procedure. | + | There are times after the first load into SAMM while you shakedown / debugging when it is useful to modify some model code without having to go through the full model reload procedure. |
- | - In the appropriate ''sim'' or ''cal'' directory, locate the .t file for the calculator you want to modify (e.g. cal/dwellingsC.t). | + | * In Documenter make the code changes in the .dmm diagram and run dimensional analysis which will refresh the code on the server. |
- | - Make the desired code modifications in this file. | + | OR |
- | - In SAMM, | + | * Alternatively, in the appropriate ''sim'' or ''cal'' directory, locate the .t file for the calculator you want to modify (e.g. cal/dwellingsC.t). |
+ | * Make the desired code modifications in this file. | ||
+ | |||
+ | Then | ||
+ | - Open SAMM | ||
+ | - //Set File Path...// to the appropriate cal or sim directory. | ||
+ | - Go in the diagram to the calculator you want to patch the code for and open it up | ||
+ | - Go to the Windows menu and choose Hierarchy | ||
+ | - Select from the menus //Hierarchy Actions | Reload Calculator...//. | ||
+ | - The code can be verified from //Hierarchy Actions | Show Code...//. | ||
+ | Note: every variable downstream of this procedure will be out of date and need to be re-evaluated.\\ | ||
+ | There are two ways to approach re-evaluating the model. | ||
+ | - Single calculator | ||
+ | - With the Diagram window active select Unevaluate Variables from the Diagram Actions menu. | ||
+ | - Double click on the variable of interest in the diagram and the model will re-evaluate all of the unevaluated variables | ||
+ | - Scenario | ||
+ | - With the Scenario window active select Unevaluate from the Scenario Actions menu. | ||
+ | - Double click on the variable of interest in the diagram and the model will re-evaluate all of the unevaluated variables | ||
+ | |||
+ | Note: the diagram code will not reflect the updated code. However, this can be manually updated from //Windows | Frameworks // and then //FW Actions | Load Diagram//. | ||