Ignore:
Timestamp:
Apr 15, 2010 2:25:11 PM (13 years ago)
Author:
srkline
Message:

Corrected the identification of HFIR trans files

Added new includes for analysis and usans, with higher version numbers. the old ones now simply point to the new one. this provides a mechanism for identifying experiments that were generated and saved with an older version of the macros - the old include file will be present. All three packages now display an alert if the experiment was generated from asn old version of the macros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Initialize.ipf

    r683 r693  
    11#pragma rtGlobals=1             // Use modern global access method. 
    2 #pragma version=5.1 
     2#pragma version=5.2 
    33#pragma IgorVersion=6.1 
    44 
     
    2828Proc Initialize() 
    2929 
    30         Variable/G root:SANS_RED_VERSION=5.10 
    31          
     30        Variable curVersion = 5.2 
     31        Variable oldVersion = NumVarOrDefault("root:SANS_RED_VERSION",curVersion) 
     32         
     33        //check for really old versions 
    3234        if(itemsinlist(WinList("Includes.ipf", ";","INCLUDE:6"),";") != 0) 
    3335                //must be opening a v4.2 or earlier template 
    34                 DoAlert 0,"This experiment was created with an old version of the macros. I'll try to make this work, but please start new work with a current template" 
     36                oldVersion = 4.2 
     37        endif 
     38         
     39        if(itemsinlist(WinList("Includes_v510.ipf", ";","INCLUDE:6"),";") != 0) 
     40                oldVersion = 5.10 
     41        endif 
     42        if(itemsinlist(WinList("Includes_v500.ipf", ";","INCLUDE:6"),";") != 0) 
     43                oldVersion = 5.00 
     44        endif 
     45         
     46        if(itemsinlist(WinList("Includes_v520.ipf", ";","INCLUDE:6"),";") != 0) 
     47                oldVersion = 5.20 
     48                //must just be a new startup with the current version 
     49                Variable/G root:SANS_RED_VERSION=5.20 
     50        endif 
     51         
     52        if(oldVersion < curVersion) 
     53                String str =    "This experiment was created with version "+num2str(oldVersion)+" of the macros. I'll try to make this work, but please start new work with a current template" 
     54                DoAlert 0,str 
    3555        endif 
    3656         
Note: See TracChangeset for help on using the changeset viewer.