;+ ; ; @file_comments ; ; @categories ; ; @param MESHFILETXTIN ; ; @keyword _EXTRA ; Used to pass keywords ; ; @returns ; ; @uses ; ; @restrictions ; ; @examples ; ; @history ; ; @version ; $Id$ ; ; @todo ; seb ; ;- ; PRO loadgrid, meshfiletxtin, _EXTRA = ex ; meshfilein = strsed(meshfiletxtin,'@@@', '''') ; compile_opt idl2, strictarrsubs ; @cm_4mesh ccmeshparameters.filename = meshfilein ; split the name according to "," delimiter meshfile = strsplit(meshfilein, ',', /extract) meshfile = strtrim(meshfile, 2) ; try to find a .pro file with this name... filepro = find(meshfile[0], /firstfound, /onlypro) ; if this is an idl batch file or a procedure if filepro NE 'NOT FOUND' THEN BEGIN CASE protype(filepro) OF ; this is a procedure 'proc':listing = file_basename(filepro, '.pro') ; this is a function, this case is not coded... 'func':stop ; this is an IDL batch file 'batch':listing = '@'+file_basename(filepro, '.pro') ENDCASE ENDIF ELSE BEGIN filenc = find(meshfile[0], /firstfound, /onlync) if filenc EQ 'NOT FOUND' THEN stop listing = 'initncdf, ''' + filenc +'''' ENDELSE ; add the arguments and keywords if necessary IF n_elements(meshfile) GT 1 AND strmid(listing, 0, 1) NE '@' THEN $ listing = listing + strmid(meshfilein, strpos(meshfilein, ',')) meshfilein = strsed(meshfilein, '''', '@@@') IF strmid(listing, 0, 1) NE '@' THEN listing = listing + ', strcalling = ''' + meshfilein + ''', _extra = ex' createpro, listing, filename = myuniquetmpdir +'for_createpro.pro', _extra = ex return END