Changeset 1017 for sans


Ignore:
Timestamp:
Nov 15, 2016 9:30:06 AM (6 years ago)
Author:
srkline
Message:

more changes to allow windows to use drives on the network neighborhood rather than force a mapped drive, since window s10 does not have the capability to map a drive.

most I/O operations are fine with either path style, except for GBLoadWave, so this is where the changes are, creating a temporary path if needed, since it seems that GBLoadWave needs either a path, or a non "UNC"-style full path:name specification.

still need to fully test on windows 10

Location:
sans/Dev/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_Igor_Procedures/NCNR_Package_Loader.ipf

    r1008 r1017  
    167167                        Execute/P "COMPILEPROCEDURES " 
    168168                        Execute/P ("Initialize()") 
     169//                      Execute/P ("PickPath()") 
    169170                        Execute/P ("DoIgorMenu \"Control\" \"Retrieve All Windows\"") 
    170171 
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf

    r1008 r1017  
    740740 
    741741// SRK 2016, for windows 10, try to eliminate this restriction           
    742                 print igorinfo(3) 
     742//              print igorinfo(3) 
    743743//              if(cmpstr("\\\\",dum[0,1])==0)  //Windoze user going through network neighborhood 
    744744//                      DoAlert 0,alertStr 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MaskUtils.ipf

    r1016 r1017  
    6565//      cmd += num2istr(pixelsX*pixelsY) + " /Q  \"" + fname +"\"" 
    6666 
    67         String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/P=catPathName/U=" 
    68         cmd += num2istr(pixelsX*pixelsY) + " /Q  \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 
    69                          
    70         Execute cmd  
     67        String GBLoadStr = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1" 
     68 
     69 
     70        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     71                PathInfo catPathName 
     72                if(V_flag==1) 
     73                        //catPathName exists, use it 
     74                        GBLoadStr += "/U="+num2istr(pixelsX*pixelsY) + " /Q/P=catPathName  \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 
     75                else 
     76                        // need to create a temporary path 
     77                        String tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     78                        NewPath/O/Q tmpUNCPath tmpPathStr 
     79                        GBLoadStr += "/U="+num2istr(pixelsX*pixelsY) + " /Q/P=tmpUNCPath  \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 
     80                endif 
     81        else 
     82        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     83                GBLoadStr += "/U="+num2istr(pixelsX*pixelsY) + " /Q  \"" + fname +"\"" 
     84        endif 
     85         
     86        Execute GBLoadStr  
    7187        SetDataFolder root:Packages:NIST:MSK                                            //make sure correct data folder is set 
    7288        WAVE data0 = $"root:Packages:NIST:MSK:data0" 
     
    402418//      cmd += num2istr(pixelsX*pixelsY) + " /Q  \"" + fname +"\"" 
    403419 
    404         String cmd = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/P=catPathName/U=" 
    405         cmd += num2istr(pixelsX*pixelsY) + " /Q  \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 
     420        String GBLoadStr = "GBLoadWave/N=data/T={72,72}/O/S=4/W=1/P=catPathName/U=" 
     421 
     422        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     423                PathInfo catPathName 
     424                if(V_flag==1) 
     425                        //catPathName exists, use it 
     426                        GBLoadStr += "/U="+num2istr(pixelsX*pixelsY) + " /Q/P=catPathName  \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 
     427                else 
     428                        // need to create a temporary path 
     429                        String tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     430                        NewPath/O/Q tmpUNCPath tmpPathStr 
     431                        GBLoadStr += "/U="+num2istr(pixelsX*pixelsY) + " /Q/P=tmpUNCPath  \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 
     432                endif 
     433        else 
     434        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     435                GBLoadStr += "/U="+num2istr(pixelsX*pixelsY) + " /Q  \"" + ParseFilePath(0, fname, ":", 1, 0) +"\"" 
     436        endif 
     437 
    406438                 
    407         Execute cmd  
     439        Execute GBLoadStr  
    408440        SetDataFolder root:myGlobals:DrawMask                                   //make sure correct data folder is set 
    409441        WAVE data0 = $"root:myGlobals:DrawMask:data0" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_DataReadWrite.ipf

    r1016 r1017  
    244244        //FBinRead Cannot handle 32 bit VAX floating point 
    245245        //GBLoadWave, however, can properly read it 
    246         String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 
    247         String strToExecute 
     246        String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 
     247        String strToExecute="",tmpfname="" 
    248248        //append "/S=offset/U=numofreals" to control the read 
    249249        // then append fname to give the full file path 
    250250        // then execute 
    251251         
     252        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     253                PathInfo catPathName 
     254                if(V_flag==1) 
     255                        //catPathName exists, use it 
     256                        GBLoadStr += "/P=catPathName" 
     257                else 
     258                        // need to create a temporary path 
     259                        String tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     260                        NewPath/O/Q tmpUNCPath tmpPathStr 
     261                        GBLoadStr += "/P=tmpUNCPath" 
     262                endif 
     263                tmpfname = ParseFilePath(0, fname, ":", 1, 0) 
     264        else 
     265        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     266                GBLoadStr += "" 
     267                tmpfname = fname 
     268        endif 
     269         
    252270        Variable a=0,b=0 
    253271         
     
    255273         
    256274        // 4 R*4 values 
    257         strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     275        strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + tmpfname + "\"" 
    258276        Execute strToExecute 
    259277        Wave w=$"root:Packages:NIST:RAW:tempGBWave0" 
     
    264282        // 4 R*4 values 
    265283        SetDataFolder curPath 
    266         strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     284        strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + tmpfname + "\"" 
    267285        Execute strToExecute 
    268286        b=4      
     
    273291        // 2 R*4 values 
    274292        SetDataFolder curPath 
    275         strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     293        strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + tmpfname + "\"" 
    276294        Execute strToExecute 
    277295        b=2      
     
    281299        // 6 R*4 values 
    282300        SetDataFolder curPath 
    283         strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     301        strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + tmpfname + "\"" 
    284302        Execute strToExecute 
    285303        b=6      
     
    289307        // 13 R*4 values 
    290308        SetDataFolder curPath 
    291         strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     309        strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + tmpfname + "\"" 
    292310        Execute strToExecute 
    293311        b=13 
     
    297315        // 3 R*4 values 
    298316        SetDataFolder curPath 
    299         strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     317        strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + tmpfname + "\"" 
    300318        Execute strToExecute 
    301319        b=3      
     
    305323        // 7 R*4 values 
    306324        SetDataFolder curPath 
    307         strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     325        strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + tmpfname + "\"" 
    308326        Execute strToExecute 
    309327        b=7 
     
    313331        // 4 R*4 values 
    314332        SetDataFolder curPath 
    315         strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     333        strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + tmpfname + "\"" 
    316334        Execute strToExecute 
    317335        b=4      
     
    321339        // 2 R*4 values 
    322340        SetDataFolder curPath 
    323         strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     341        strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + tmpfname + "\"" 
    324342        Execute strToExecute 
    325343        b=2 
     
    329347        // 2 R*4 values 
    330348        SetDataFolder curPath 
    331         strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     349        strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + tmpfname + "\"" 
    332350        Execute strToExecute 
    333351        b=2 
     
    337355        // 5 R*4 values 
    338356        SetDataFolder curPath 
    339         strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     357        strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + tmpfname + "\"" 
    340358        Execute strToExecute 
    341359        b=5      
     
    358376        SetDataFolder curPath 
    359377        //read in the data 
    360         strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=catPathName" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     378//      strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=catPathName" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     379        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     380                PathInfo catPathName 
     381                if(V_flag==1) 
     382                        //catPathName exists, use it 
     383                        strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=catPathName " + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     384                else 
     385                        // need to create a temporary path 
     386                        tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     387                        NewPath/O/Q tmpUNCPath tmpPathStr 
     388                        strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=tmpUNCPath " + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     389                endif 
     390        else 
     391        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     392                strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q " + "\"" + fname + "\"" 
     393        endif 
     394 
     395 
    361396        Execute strToExecute 
    362397 
     
    652687        //FBinRead Cannot handle 32 bit VAX floating point 
    653688        //GBLoadWave, however, can properly read it 
    654         String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 
    655         String strToExecute 
     689        String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 
     690        String strToExecute="",tmpfname="" 
    656691        //append "/S=offset/U=numofreals" to control the read 
    657692        // then append fname to give the full file path 
    658693        // then execute 
    659          
     694 
     695        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     696                PathInfo catPathName 
     697                if(V_flag==1) 
     698                        //catPathName exists, use it 
     699                        GBLoadStr += "/P=catPathName" 
     700                else 
     701                        // need to create a temporary path 
     702                        String tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     703                        NewPath/O/Q tmpUNCPath tmpPathStr 
     704                        GBLoadStr += "/P=tmpUNCPath" 
     705                endif 
     706                tmpfname = ParseFilePath(0, fname, ":", 1, 0) 
     707        else 
     708        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     709                GBLoadStr += "" 
     710                tmpfname = fname 
     711        endif 
     712                 
    660713        Variable a=0,b=0 
    661714         
    662715        SetDataFolder curPath 
    663716        // 4 R*4 values 
    664         strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     717        strToExecute = GBLoadStr + "/S=39/U=4" + "\"" + tmpfname + "\"" 
    665718        Execute strToExecute 
    666719         
     
    673726        // 4 R*4 values 
    674727        SetDataFolder curPath 
    675         strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     728        strToExecute = GBLoadStr + "/S=158/U=4" + "\"" + tmpfname + "\"" 
    676729        Execute strToExecute 
    677730        b=4      
     
    682735        // 2 R*4 values 
    683736        SetDataFolder curPath 
    684         strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     737        strToExecute = GBLoadStr + "/S=186/U=2" + "\"" + tmpfname + "\"" 
    685738        Execute strToExecute 
    686739        b=2      
     
    690743        // 6 R*4 values 
    691744        SetDataFolder curPath 
    692         strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     745        strToExecute = GBLoadStr + "/S=220/U=6" + "\"" + tmpfname + "\"" 
    693746        Execute strToExecute 
    694747        b=6      
     
    698751        // 13 R*4 values 
    699752        SetDataFolder curPath 
    700         strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     753        strToExecute = GBLoadStr + "/S=252/U=13" + "\"" + tmpfname + "\"" 
    701754        Execute strToExecute 
    702755        b=13 
     
    706759        // 3 R*4 values 
    707760        SetDataFolder curPath 
    708         strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     761        strToExecute = GBLoadStr + "/S=320/U=3" + "\"" + tmpfname + "\"" 
    709762        Execute strToExecute 
    710763        b=3      
     
    714767        // 7 R*4 values 
    715768        SetDataFolder curPath 
    716         strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     769        strToExecute = GBLoadStr + "/S=348/U=7" + "\"" + tmpfname + "\"" 
    717770        Execute strToExecute 
    718771        b=7 
     
    722775        // 4 R*4 values 
    723776        SetDataFolder curPath 
    724         strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     777        strToExecute = GBLoadStr + "/S=388/U=4" + "\"" + tmpfname + "\"" 
    725778        Execute strToExecute 
    726779        b=4      
     
    730783        // 2 R*4 values 
    731784        SetDataFolder curPath 
    732         strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     785        strToExecute = GBLoadStr + "/S=450/U=2" + "\"" + tmpfname + "\"" 
    733786        Execute strToExecute 
    734787        b=2 
     
    738791        // 2 R*4 values 
    739792        SetDataFolder curPath 
    740         strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     793        strToExecute = GBLoadStr + "/S=470/U=2" + "\"" + tmpfname + "\"" 
    741794        Execute strToExecute 
    742795        b=2 
     
    746799        // 5 R*4 values 
    747800        SetDataFolder curPath 
    748         strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     801        strToExecute = GBLoadStr + "/S=494/U=5" + "\"" + tmpfname + "\"" 
    749802        Execute strToExecute 
    750803        b=5      
     
    766819         
    767820        //read in the data 
    768         GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 
     821        GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 
     822 
     823        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     824                PathInfo catPathName 
     825                if(V_flag==1) 
     826                        //catPathName exists, use it 
     827                        GBLoadStr += "/P=catPathName" 
     828                else 
     829                        // need to create a temporary path 
     830                        tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     831                        NewPath/O/Q tmpUNCPath tmpPathStr 
     832                        GBLoadStr += "/P=tmpUNCPath" 
     833                endif 
     834                tmpfname = ParseFilePath(0, fname, ":", 1, 0) 
     835        else 
     836        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     837                GBLoadStr += "" 
     838                tmpfname = fname 
     839        endif 
     840 
    769841 
    770842        curPath = "root:Packages:NIST:"+cur_folder 
     
    793865                SetDataFolder curPath 
    794866                 
    795                 strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=511" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     867                strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=511" + "\"" + tmpfname + "\"" 
    796868                Execute strToExecute 
    797869                //Print strToExecute 
     
    802874                offset += 511*4 +2 
    803875                 
    804                 strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=510" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     876                strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=510" + "\"" + tmpfname + "\"" 
    805877                SetDataFolder curPath 
    806878                Execute strToExecute 
     
    819891        // 16336 values have been read in -- 
    820892        //read in last 64 values 
    821         strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=48" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     893        strToExecute = GBLoadStr + "/S="+num2str(offset)+"/U=48" + "\"" + tmpfname + "\"" 
    822894         
    823895        SetDataFolder curPath 
     
    15031575        Variable start 
    15041576 
    1505 // original, if fname is the full path:name 
    1506 //      String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q"   
    1507 //      GBLoadStr += "/S="+num2str(start)+"/U=1" + "\"" + fname + "\"" 
    1508  
    1509         String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName"                     
    1510 //      String fileOnly = ParseFilePath(0, fname, ":", 1, 0) 
    1511         GBLoadStr += "/S="+num2str(start)+"/U=1" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
    1512  
     1577        String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q"   
     1578         
     1579        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     1580                PathInfo catPathName 
     1581                if(V_flag==1) 
     1582                        //catPathName exists, use it 
     1583                        GBLoadStr += "/S="+num2str(start)+"/U=1/P=catPathName " + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     1584                else 
     1585                        // need to create a temporary path 
     1586                        String tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     1587                        NewPath/O/Q tmpUNCPath tmpPathStr 
     1588                        GBLoadStr += "/S="+num2str(start)+"/U=1/P=tmpUNCPath " + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     1589                endif 
     1590        else 
     1591        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     1592                GBLoadStr += "/S="+num2str(start)+"/U=1" + "\"" + fname + "\"" 
     1593        endif 
     1594         
    15131595         
    15141596        Execute GBLoadStr 
    15151597        Wave w=$"tempGBWave0" 
     1598         
     1599        KillPath/Z tmpUNCPath 
    15161600         
    15171601        return(w[0]) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf

    r1016 r1017  
    990990         
    991991        SetDataFolder root: 
    992 //      String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 
    993         String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 
    994         String strToExecute="" 
    995         // 1 R*4 value 
    996 //      strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + fname + "\"" 
    997         strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\""              //use the path and just the file name 
    998         Execute strToExecute 
     992        String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 
     993 
     994        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     995                PathInfo catPathName 
     996                if(V_flag==1) 
     997                        //catPathName exists, use it 
     998                        GBLoadStr += "/S=368/U=1/P=catPathName " + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     999                else 
     1000                        // need to create a temporary path 
     1001                        String tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     1002                        NewPath/O/Q tmpUNCPath tmpPathStr 
     1003                        GBLoadStr += "/S=368/U=1/P=tmpUNCPath " + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     1004                endif 
     1005        else 
     1006        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     1007                GBLoadStr += "/S=368/U=1" + "\"" + fname + "\"" 
     1008        endif 
     1009                 
     1010        Execute GBLoadStr 
    9991011        Wave w=$"root:tempGBWave0" 
    10001012        xPos = w[0] 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/RealTimeUpdate_RT.ipf

    r1016 r1017  
    852852        //FBinRead Cannot handle 32 bit VAX floating point 
    853853        //GBLoadWave, however, can properly read it 
    854         String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q/P=catPathName" 
    855         String strToExecute 
     854        String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 
     855        String strToExecute,tmpfname="" 
    856856        //append "/S=offset/U=numofreals" to control the read 
    857857        // then append fname to give the full file path 
    858858        // then execute 
     859         
     860        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     861                PathInfo catPathName 
     862                if(V_flag==1) 
     863                        //catPathName exists, use it 
     864                        GBLoadStr += "/P=catPathName" 
     865                else 
     866                        // need to create a temporary path 
     867                        String tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     868                        NewPath/O/Q tmpUNCPath tmpPathStr 
     869                        GBLoadStr += "/P=tmpUNCPath" 
     870                endif 
     871                tmpfname = ParseFilePath(0, fname, ":", 1, 0) 
     872        else 
     873        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     874                GBLoadStr += "" 
     875                tmpfname = fname 
     876        endif 
     877         
    859878         
    860879        Variable a=0,b=0 
     
    966985        SetDataFolder curPath 
    967986        //read in the data 
    968         strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=catPathName" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     987        if(cmpstr("\\\\",fname[0,1])==0)        //Windows user going through network neighborhood 
     988                PathInfo catPathName 
     989                if(V_flag==1) 
     990                        //catPathName exists, use it 
     991                        strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=catPathName" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     992                else 
     993                        // need to create a temporary path 
     994                        tmpPathStr = ParseFilePath(1, fname, ":", 1, 0) 
     995                        NewPath/O/Q tmpUNCPath tmpPathStr 
     996                        strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q/P=tmpUNCPath" + "\"" + ParseFilePath(0, fname, ":", 1, 0) + "\"" 
     997                endif 
     998        else 
     999        // original case, fname is the full path:name and is Mac (or a mapped drive) 
     1000                strToExecute = "GBLoadWave/O/N=tempGBwave/B/T={16,2}/S=514/Q" + "\"" + fname + "\"" 
     1001        endif 
     1002         
    9691003        Execute/Z strToExecute 
    9701004 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/SANS_Utilities.ipf

    r1008 r1017  
    427427                 
    428428// SRK 2016, for windows 10, try to eliminate this restriction           
    429                 print igorinfo(3) 
    430 //              if(cmpstr("\\\\",dum[0,1])==0)  //Windoze user going through network neighborhood 
     429//              print igorinfo(3) 
     430//              if(cmpstr("\\\\",dum[0,1])==0)  //Windows user going through network neighborhood 
    431431//                      DoAlert 0,alertStr 
    432432//                      KillPath catPathName 
Note: See TracChangeset for help on using the changeset viewer.