//**********************************************
// Filename:	FILE.OGS
// Creation:	8/16/95 by CP
// Purpose:	File menu scripts
//**********************************************
// Modification Log:
// 			10/10/95 JMP	Set comment box ON  for FILE:OPEN and FILE:SAVE AS
//			10/10/95 JMP	Set comment box OFF for FILE:TEMPLATE:SAVE AS
//			10/12/95 JMP	Add script for FILE:TEMPLATE:OPEN Worksheet/Plot/Matrix
//			10/12/95 JMP	Replace script for FILE:IMPORT:ASCII to use FDLOG properties
//			10/24/95 JMP	Add section for Windows MetaFile
//			10/24/95 JMP	Use FDLOG methods and properties to explicitly control dialog boxes
//			DSB v3.85 11/8/95 SAVE_MATRIX Add open matrix window option   NOT ACTUALLY DONE YET
//			QZCao, v3.98, 12/26/95, OLE_SUPPORT, Support ole
//			CPY v4.00 1/25/96 LONG_FILENAMES, add quotes to %A
//			03/05/96 JMP	CHECK_MULTICELL_SELECTION	ASCII export enables SELECTION only when wks.sel>1
//			CPY v4.11 b759 ENABLE_SAVE_MATRIX, remove marks on SAVE_MATRIX and enable David's change
//			ML v4.11 7/15/96 B1051 GET_FILE_NAME
//			JMP V4.11 7/18/96 EXCEL32DBASE32
//			RKM v4.18 7/26/96 commented out saving as 2.8
//			RKM for v5.0 added Close and Exit sections
//			11 Oct '96 grd Added binary import section
//			11/18/96 CPY	Add Excel Open option
//			11/25/96 JMP v4.13 added ImportOptions, ImportASCIIOptions, LastImport sections
//			JLIU	v4.14 12/6/96 INIT_OPTION_PROPERTY
//			CPY 12/16/96 SCRIPT_ACCESS_EXCEL_OLE 
//			HYYU 1/124/97	CHANGE_ODBCDLL_NAME
//			RKM 2/4/97 v4.161 ORG_PROF_MENUS, add menus specific to Origin Professional
//			ML 2/19/97 SET_CORRECT_PATH_FROM_PAGE
//			JMP v4.95 	02/28/97 Use_Option_Path
//			JMP v4.961 	03/04/97 Use_New_MultiOpen_Dialog
//			JMP v4.962	03/05/97 SETDEFAULT_SETS_PATH_AND_DEFAULT
//			HYYU v4.962	4/8/97 CONSIDER_CANCEL_FOR_ODBC
//			JMP v4.978	4/25/97 USE_TRACKING_OF SINGLE EXTENSION TYPES
//			JMP v4.978	4/27/97 SYSTEM.EXCEL( )
//			HYYU v4.988	5/29/97 ODBC messabe
//			JMP v4.9983	7/01/97	EXPORT_LABELS Export labels independently of CSV
//			JMP v4.9984	7/02/97 READ_ONLY_OPEN Use Read only property to open as read only
//			HYYU v4.9985	7/9/97 t2646 KEEP_COLUMN_SPECIFICATIONS_FOR_ODBC_INPUT
//			EJP v5.003 08-01-97 UPDATE_APP_DATA_PATH
//			DVT	v6.011	t3643	4/7/98	ODBC_IMPORT_SQL
//			RKM v6.045	1/4/99 MULTI_IMPORT_WKS
//			CPY v6.0252 t6746 1/26/00 MULTI_OPEN_SUPPORT_BY_ROW_AND_BY_COL_APPEND
//			CPY v6.0294 t8126 6/27/00  IMPORT_IMAGE_INTO_MATRIX
//			CPY v6.0295 t8164 6/29/00 RESET_BYTE_ORDER_BEFORE_WAVE_IMPORT
//			CPY v6.1017 t8293 8/3/00 MOVE_ODBC_TO_SEPARATE_OGS_FILE
//			CPY v6.1018 8/4/00 MOVE_EXPORT_PAGE_TO_GRAPHEXP
//			CPY v6.1018 8/10/00 MOVE_IMAGE_IMPORT_EXPORT, moved codes here from file.ogs
//			SDB v6.1045 9/8/00, moved codes to AppFile.ogs 
//			LY  6/25/01, add new import file format ODD
//			EJP 02-26-2003 FIX_EXCEL_SAVE_PATH_NOT_BEING_USED
//			DVT 4/11/03 REMOVE_TREE_UTILS_FROM_LVDLG
//			SY 07-08-2003 QA70-4762 v7.0619 OPEN_ORIGINC_FILE_USING_RUN_COMMAND
//			EJP 07-10-2003 v7.0622 QA70-4745 SET_PAGE_IMPORT_INFO_ON_123_ASC_IMPORT
//			EJP 07-14-2003 v7.0624 QA70-4824 FILE_OPEN_CHANGES
//			GRD 2003.07.17 Make New Worksheets the default for MultiImport
//			SY 07-25-2003 QA70-4901 v7.0636 FIX_EXPORT_ASCII_SELECTION
//			SY 08-04-2003 qa70-4943 v7.0644 ORIGIN_FILE_EXTENSIONS_USING_LOWER_CASE
//			SY 08-11-2003 QA70-4927 v7.5653 ADD_OPEN_SAMPLES_MENU_ITEM
//			RVD 9/15/2003 QA70-5179 v7.0695 THEME_SPECIAL_CONTEXT_MENU
//			SDB 10/7/03 Save the defType for user filters
//			SDB 10/7/03 Allow for opening multiple windows
//			CPY 10/26/03 QA70-3096 WKS_IMPORT_CHK_FILE_NAME_ALLOW_USE_ORIGINAL_WKS
//**********************************************
//	Rules:		For using FDLOG.OPEN( ) do not specify path beforehand, it will be handled automatically
//			If path is specified beforehand, then the automatic path is ignored
//
//			For using FDLOG.SAVE( ) be sure to set default filename using .Default$ or .SetDefault(StringVar)
///////////////////////////////////////////////////

[Init]
	FDLOG.Reset();
	FDLOG.DlgName$="";
	FDLOG.OptionDLG$="";		//Reset button to off
	FDLOG.checkname$="";		//Reset check box to null
	FDLOG.ShowComment=0;		//close the comments box
	FDLOG.CheckStatus=0;		//Set checkbox to off
	FDLOG.default$="";		//Set contents of "File Name" edit box to nothing
	//------------------- CPY v6.0252 t6746 1/26/00 MULTI_OPEN_SUPPORT_BY_ROW_AND_BY_COL_APPEND
	FDLOG.MultiOpen.ComboName$="";
	if(FDLOG.MultiOpen.ComboSel<1 || FDLOG.MultiOpen.ComboSel>3)
		FDLOG.MultiOpen.ComboSel = 1;// import into new worksheets (Make New Worksheets the default for MultiImport)
//		FDLOG.MultiOpen.ComboSel = 2;// import into new columns
//		FDLOG.MultiOpen.ComboSel = 3;// import into new rows
	//------------------- end t6746	
	return 0;

///////////////////////////////////////////////////
[Open]
	run.section(,Init);
	//QZCao, v3.98, 12/26/95, OLE_SUPPORT, Support ole
	if(page.oleAskUpdate(Open)==1)
		return	0;

	///SDB 10/7/03 Save the defType for user filters
	ii=FDLOG.defType;
	FDLOG.UseGroup(Origin);
	FDlog.AddUserTypes();
	FDLOG.defType=ii;
	FDlog.Open.MultiSel = 1;
	
	FDLOG.ShowComment=1;	// open the comments box
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.path$;
	switch(FDLOG.DefType)
	{
	case 1 to 2: // OPJ and ORG files
		//JMP v4.9984	7/02/97 READ_ONLY_OPEN
		for( iFile = 1; iFile <= FDlog.MultiOpen.Count; iFile++ )
		{
			FDlog.Get(A,iFile); // %a = file name
			if( FDlog.MultiOpen.Count == 1 )
			{
				if (FDLOG.AsReadOnly)
					doc -oR %B%A;
				else
					doc -open %B%A;
				
				iFile = 1;	// must do this because doc -o wipes out all the variables. 
			}
			else
			{
				%Z = pe_get_path()$; // remember starting folder
				doc -Append %B%A;
				pe_cd %Z;
			}
		}
		break;
	case 3 to 5: // OGW, OGG, OGM files
		///SDB 10/7/03 Allow for opening multiple windows
		for( iFile = 1; iFile <= FDlog.MultiOpen.Count; iFile++ )
		{
			FDlog.Get(A,iFile); // %a = file name
			doc -Append %B%A;
		}
		break;
	/// EJP 07-14-2003 v7.0624 QA70-4824 FILE_OPEN_CHANGES
	/*
	case 6:	// TXT files
		open -n "%B%A";
		break;
	case 7: // OGS files
		ed.open(%B%A);
		break;
	*/
	case 6: // ASCII data
		for( iFile = 1; iFile <= FDlog.MultiOpen.Count; iFile++ )
		{
			%A = System.Wks.DefTemplate$;
			win -t data "%A";
			FDlog.Get(A,iFile); // %A = file name
			open -w %A;
		}
		break;
	case 7: // Notes
		///SDB 10/7/03 Allow for opening multiple windows
		for( iFile = 1; iFile <= FDlog.MultiOpen.Count; iFile++ )
		{
			FDlog.Get(A,iFile); // %a = file name
			open -n "%B%A";
		}
		break;
	case 8: // Origin programming
		///SDB 10/7/03 Allow for opening multiple windows
		for( iFile = 1; iFile <= FDlog.MultiOpen.Count; iFile++ )
		{
			FDlog.Get(A,iFile); // %a = file name
			ed.open(%B%A);
		}
		break;
	/// end FILE_OPEN_CHANGES
	default:
		for( iFile = 1; iFile <= FDlog.MultiOpen.Count; iFile++ )
		{
			%B=FDLOG.path$; // get path again for each file incase import code changes %b
			FDlog.Get(a,iFile); // %a = file name
			Doc.DropFileName$="%b%a";
			/*
			FDlog.Get(k,iFile,2); // %k = file extension
			// %z = file type name
			Ini.GetStr(z,, %k, Extensions, %yFileTypes.ini);
			if( %z == "" )
			{
				Type "File type %k is not supported.";
				continue;
			}
			
			// %z = OGS file name from FileTypes folder
			Ini.GetStr(z,, %k, %z, %yFileTypes.ini);
			
			// %k = File Open window template
			Ini.GetStr(k,, OnFileOpenWindow, TypeInfo, %z);
			if( "%k" != "" )
				win -t t %k;
			*/			
			Doc.DropWinName$="";
			Doc.DropLayer=1;
			Doc.DropIndex=iFile;
			Doc.DropCount=FDlog.MultiOpen.Count;
			/*		
			// %k = OriginC Load function
			Ini.GetStr(k,, Process, OriginC, %z);
			if( %k == "" )
			{
				Run.Section(%z, Main);
			}
			else
			{
				Run.Section(, LayerLink, "%z");
			}
			*/
			Run.Section(, FileImport);
		}
	}
	return 0;

[FileImport]
	if( @KS ) //ctrl is down
	{
		run.LoadOC(OriginLab\ImportWiz.ocw);
		ImportWizard %L;
		return 0;
	}
	
	run.LoadOC(OriginLab\FileImport.ocw);
	/// EJP 08-08-2003 v7.0650 QA70-4073.53 USE_SAME_FILTER_FOR_MULTI_FILES_ON_FILEOPEN_AND_DRAGDROP
	/* For better control we will call the Import Wizard from inside HandleDataFile.
	if( !HandleDataFile() )
	{
		run.LoadOC(OriginLab\ImportWiz.ocw);
		ImportWizard %L;
	}
	*/
	run.LoadOC(OriginLab\ImportWiz.ocw);
	HandleDataFile();
	/// end USE_SAME_FILTER_FOR_MULTI_FILES_ON_FILEOPEN_AND_DRAGDROP
	return 0;

[DragDropUnknown]
	// This section will be deleted later when all places call DragDrap section
	Run.Section(,DragDrop);
	return 0;
	
[DragDrop]
	// Get DoFile section name
	/// SY 07-08-2003 QA70-4762 v7.0619 OPEN_ORIGINC_FILE_USING_RUN_COMMAND
	///	%L = Doc.DropFileName$;
	// If open OriginC file from command line, Doc.DropFileName$ is not set yet, 
	// Then %1, %2, ... contain the command line arguments. 
	// Also, the filename in run command need to be quoted if filename has spaces in it.
	%L = %1;
	if( %L == "" )
		%L = Doc.DropFileName$;
	/// end OPEN_ORIGINC_FILE_USING_RUN_COMMAND
//	n = %[%L];
//	%Z = "OnOpen%[%L,n-2:n]";
	%Z=%[%L,>'.']; // GJL 5/21/03 Add support for single and double character file extensions
	for( ; 1; )
	{
	  if(%[%[%Z,>'.']]==0) break;
	  %Z=%[%Z,>'.'];
	}
	%Z="OnOpen%Z";
	
	// Call DoFile section
	n = Run.Section(DoFile.ogs,%Z,"%L");
	if( 0/0 != n )
		return 0; // DoFile handled the file
	
	// Handle file by filter or ImportWizard
	Run.Section(,FileImport,"%L");
	return 0;

[LayerLink]
	// This section assumes Doc.Drop* properties have been set.
	// %1 == Name of OGS file that handles the file type.

	// until we have Layer.UpdateLink() method, we use this macro below
	def LayerUpdateLink { // this macro will need to use %L,%M
		%L=Layer.Info.System.Link.Source$;
		if(run.loadOC("%L") != 0)
		{
			type "%L" not compiled;
		}
		else
		{
			i=Doc.DropLayer;
			%K=Doc.DropWinName$;
			%L=Layer.Info.System.Link.Parent$;
			%M=Layer.Info.System.Link.Process$;
			%M=;
			%M(%K,i,%L);
		}
	};

	%z=%1;
  
	Layer.Info.System.Link.Parent$=Doc.DropFileName$;

	Ini.GetStr(k,, Process, OriginC, %z);
	Layer.Info.System.Link.Process$=%k;

//	Ini.GetStr(k,, Prepare, PageInfo, %z);
//	Layer.Info.System.Link.Prepare$=%k;

//	Ini.GetStr(k,, Modify, PageInfo, %z);
//	Layer.Info.System.Link.Modify$=%k;

	Ini.GetStr(k,, Source, OriginC, %z);
	if( %k == "" )
	{
		Layer.Info.System.Link.Source$=%z;
	}
	else
	{
		Layer.Info.System.Link.Source$=%k;
	}

	// Update Layer
	//Layer.UpdateLink();
	LayerUpdateLink; // call macro until method is implemented
	

[Import]
	run.section(,Init);

	FDlog.Numtypes=0;
	FDlog.Open.MultiSel=1;
	FDLOG.ShowComment=1; // open the comments box
	
	i=exist(%H,10);
	switch(i)
	{
	case 2: // Worksheet
		FDlog.AddUserTypes(0, 1);
		break;
	case 5: // Matrix
		FDlog.AddUserTypes(0, 2);
		break;
	default:
		return 1;
	};

	if(FDLOG.Open(A))
		return 1;
	
	%B=FDLOG.path$;
	for( iFile = 1; iFile <= FDlog.MultiOpen.Count; iFile++ )
	{
		FDlog.Get(a,iFile); // %a = file name
		Doc.DropFileName$="%b%a";

		FDlog.Get(k,iFile,2); // %k = file extension
		// %z = file type name
		Ini.GetStr(z,, %k, Extensions, %yFileTypes.ini);
		if( %z == "" )
		{
			Type "File type %k is not supported.";
			continue;
		}
		
		// %z = OGS file name from FileTypes folder
		Ini.GetStr(z,, %k, %z, %yFileTypes.ini);
		
		Doc.DropWinName$=%h;
		Doc.DropLayer=1;
		Doc.DropIndex=iFile;
		Doc.DropCount=FDlog.MultiOpen.Count;
	
		// %k = OriginC Load function
		Ini.GetStr(k,, Process, OriginC, %z);
		if( %k == "" )
		{
			Run.Section(%z, Main);
		}
		else
		{
			Run.Section(, LayerLink, "%z");
		}
	}
	return 0;
	


///////////////////////////////////////////////////
[OpenExcel]
	run.section(,Init);
	FDLOG.UseGroup(Excel);
	//QZCao, v3.98, 12/26/95, OLE_SUPPORT, Support ole
	if(page.oleAskUpdate(Open)==1)
		return	0;
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.path$;
	//JMP v4.9984	7/02/97 READ_ONLY_OPEN
	if (FDLOG.AsReadOnly)
		doc -aR %B%A;
	else
		doc -append %B%A;
	return 0;

///////////////////////////////////////////////////
/// SY 08-11-2003 QA70-4927 v7.5653 ADD_OPEN_SAMPLES_MENU_ITEM
[OpenSamples]
	run.section(,Init);
	FDLOG.UseGroup(Samples);
	%B = System.PATH.PROGRAM$; 
	%B = %BSamples;
	FDLOG.path$ = %B;
	FDLOG.ShowComment=1;			// open the comments box
	FDlog.Open.MultiSel=1;

	if( FDLOG.Open(A) )
		return 1;
	%B = FDLOG.path$;
	
	for( iFile = 1; iFile <= FDlog.MultiOpen.Count; iFile++ )
	{
		FDlog.Get(A, iFile); // %A = file name

		FDlog.Get(k, iFile, 2); // %k = file extension
		
		if( %k == "opj" || %k == "OPJ" )
		{
			// OPJ files
			if (FDLOG.AsReadOnly)
				doc -oR %B%A;
			else
				doc -open %B%A;
		}
		else if( %k == "c" || %k == "cpp" || %k == "h" || %k == "ogs" ||
			 %k == "C" || %k == "CPP" || %k == "H" || %k == "OGS")
		{
			// OriginC files
			ed.open(%B%A);
		}
	}
	return 0;
/// end ADD_OPEN_SAMPLES_MENU_ITEM

///////////////////////////////////////////////////
[AppendProject]
	run.section(,Init);
	FDLOG.UseGroup(Origin);
	FDLOG.UseType("OPJ ORG");
	FDlog.Open.MultiSel = 1;
	FDLOG.ShowComment=1;			// open the comments box
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.path$;
	%Z = pe_get_path()$; // remember starting folder 
	loop(ii,1,FDlog.MultiOpen.Count) 
	{ 
		FDlog.Get(A,ii); 
		doc -Append %B%A; 
		pe_cd %Z; // return to starting folder 
	} 
	doc -ln; // don't know what this does, but was in original script 
	return 0; 	
	
	
///////////////////////////////////////////////////
[SaveProject]
	if(doc.isNew)
		run.section(,SaveProjectAs);
	else
	{
		//JMP v4.978	4/27/97 SYSTEM.EXCEL( )
		if (system.excel.SaveAsExcel==1 && system.excel()==0)
			return;
		save;
	}
	return 0;

///////////////////////////////////////////////////
[SaveProjectAs]
	//JMP v4.978	4/27/97 SYSTEM.EXCEL( )
	if ((system.excel.SaveAsExcel==1 || system.excel.SaveAsExcel==2) && system.excel()==0)
		return 1;
	run.section(,Init);
	//QZCao, v3.98, 12/26/95, OLE_SUPPORT, Support ole
	if(page.oleAskUpdate(SaveAs))
		return	0;
	FDLOG.default$=%G;
	///CPY 12/16/96 SCRIPT_ACCESS_EXCEL_OLE
	FDLOG.UseGroup(Origin);
	if(doc.OleInfo) /// for OLE embedding or linking
	{
		FDLOG.UseType("OGG")		
	}
	else
	{
		FDLOG.UseType("OPJ ORG");
	}

	FDLOG.ShowComment=1;	// open the comments box
	if(%X!="")
		FDLOG.path$=%X;
	if(FDLOG.SaveAs(A))
		return 1;
	%B=fdlog.path$;

	//QZCao, v3.98, 12/26/95, OLE_SUPPORT, Support ole
	page.oleUpdate(SaveAs);

	if(FDLOG.DefType==2) 
		save -DI3 "%B%A";
	else
		save -DI1 "%B%A";
	///

	return 0;

///////////////////////////////////////////////////
[Close]
	document -new Untitled;


///////////////////////////////////////////////////////
///QZCao, v3.98, 12/26/95, OLE_SUPPORT, Support ole
[OleUpdateEmbedded]
	page.oleaskupdate(Update);


///////////////////////////////////////////////////////
[GetWinType]
	// set %A to template name
	// set %B to Window template extension
	// set i to win type

	/// RB 5/24/99 t6477 6.0205 PUT_TEMPLATE_FILE_EXTENSION_TO_GLOBAL_STRING_%B
	win -GE; // set %A and %B
	i=exist(%H,10);
	return 0;

[SaveTemplate]
	run.section(,GetWinType); // update %B
	///JMP v4.95 02/28/97 Use_Option_Path
	type -v -c [Save %H as %A.%B?];
	/// SY 08-04-2003 qa70-4943 v7.0644 ORIGIN_FILE_EXTENSIONS_USING_LOWER_CASE
	///	if(%B=="OTP")
	if( %B == "otp" || %B=="OTP" )
	/// end ORIGIN_FILE_EXTENSIONS_USING_LOWER_CASE
		save -Tb 200 %H %A;
	else
		save -T %H %A;
	return 0;

[SaveAsTemplate]
	run.section(,Init);
	run.section(,GetWinType); // update %B
	win -G; // set %A
	FDLOG.UseGroup(Template);
	switch(i)
	{
	case 2:
		FDLOG.UseType("OTW");
		break;
	case 3:
		FDLOG.UseType("OTP");
		break;
	case 5:
		FDLOG.UseType("OTM");
		break;
	default:
		return 1;
	};

	FDLOG.Default$=%A;
	fdlog.path$=%Y; /// EJP 09-24-2003: Per Easwar, force path to User Files.
	if(i==3)
	{
		FDLOG.combobox.choice$="My Templates";
		FDLOG.combobox.inifile$=%YTemplate.ini;
		FDLOG.combobox.inisec$=Categories;
		FDLOG.combobox.label$=Category Name;
	}

	if(FDLOG.SaveAs(A))
		return 1;
	%B=FDLOG.path$;
	if(i==3)
	{
		save -Tb 200 %H %B%A;
		%B=FDLOG.combobox.choice$;
		run.section(TemplateLibrary,AddTemplate,"%B");
	}
	else
	{
		save -T %H %B%A;
	}
	return 0;

[OpenAnyTemplate]
	FDLOG.UseGroup(Template);
	run.section(,OpenTemplate);
	
[OpenTemplate]
	run.section(,Init);
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.path$;
	doc -t %B%A;
	return 0;

///////////////////////////////////////////////////
[SaveWindow]
	run.section(,Init);
	i=exist(%H,10);
	switch(i)
	{
	case 2:
		///CPY 12/16/96 SCRIPT_ACCESS_EXCEL_OLE
		//FDLOG.Type1$=$DialogBox.SaveWksWindow;
		if(page.ExtInfo)
			FDLOG.UseGroup(Excel);
		else
		{
			FDLOG.UseGroup(Origin);
			FDLOG.UseType("OGW");
		}
		break;
	case 3:
		FDLOG.UseGroup(Origin);
		FDLOG.UseType("OGG");
		break;
	case 5:
		FDLOG.UseGroup(Origin);
		FDLOG.UseType("OGM");
		break;
	default:
		return 1;
	};

	/// EJP 02-26-2003 FIX_EXCEL_SAVE_PATH_NOT_BEING_USED
	///%A=page.filepath$;
	///if ("%A"!="")
	///	FDLOG.path$="%A";
	/// end FIX_EXCEL_SAVE_PATH_NOT_BEING_USED

	%B=page.filename$;
	if ("%B"=="")
		%B=%H;				//Use window name when no file name
	FDLOG.default$="%B";

	if(FDLOG.SaveAs(A))
		return 1;
	%B=FDLOG.Path$;
	save -i %B%A; 				// save independent window
	return 0;

/////////////////////////////////////////////////////////
[ImportOptions]
	worksheet -edit Import;


//////////////////////////////////////////////////////////
[ImportASCIIOptions]
	run.section(,Init);
	worksheet  -edit Ascii;
	// ML v3.821 8/22/95
	// this was taken from 3.7842:
	if (i==1)
	{
		FDLOG.UseGroup(Ascii);
		FDLOG.DlgName$=$DialogBox.ImportTitle;
		if(FDLOG.Open(A))
			return 1;
		%B=fdlog.path$;
		open -W %B%A;
	}
	else
	   type -b $general.TemplSaved;

	return 0;

/////////////////////////////////////////////////////////
[SingleImport]
	run.section(,ImportAscii);

////////////////////////////////////////////////////////
/// RKM: Multi Import for Wks MULTI_IMPORT_WKS
////////////////////////////////////////////////////////
[MultiImportWKS]
	run.section(,Init);
	if(FDLOG.multiopen.sort==0)
	{
		//---------- CPY v6.0252 t6746 1/26/00 MULTI_OPEN_SUPPORT_BY_ROW_AND_BY_COL_APPEND
		// we are going to use combo, so 
		if(FDLOG.MultiOpen.ComboSel==1)
			FDLOG.multiopen.colview=14;// Filename, template, size, modied
		else
			FDLOG.multiopen.colview=12;	//By default, display Filename, Size and Modified
		//---------- end t6746
	}
	else
		FDLOG.multiopen.colview=0;	//Only display Filename
	FDLOG.UseGroup(Ascii);	
	FDLOG.Message$="";

	FDLOG.MultiOpen.ComboName$=$File.WKSImportAsComboTitle;
	FDLOG.MultiOpen.ComboList$=$File.WKSImportAsComboList;

	FDLOG.MultiOpen.ColToggle=2;	//Enable the Template column toggling with the checkbox
	

	if (FDLOG.multiopen()==0/0)
		return 1;

	// still need to wait for Irene to fix the index problem, right now it is 0,1,2, so later need to change this
	FDLOG.CheckStatus = FDLOG.MultiOpen.ComboSel==1?0:1; // CPY v6.0252 t6746 1/26/00 MULTI_OPEN_SUPPORT_BY_ROW_AND_BY_COL_APPEND

	loop(ii,1,FDlog.MultiOpen.Count)
	{
		FDlog.Get(A, ii);
		if(run.section(,OpenFileWks)!=0) 
		{
			if(FDLOG.CheckStatus==0)
			{
				page.closebits=2;
				win -ca;
			}
			continue;	//If non-ASCII file, continue with loop
		}
	}
	return 0;

[OpenFileWks]
	if(FDLOG.CheckStatus==1)
	{
		// CPY v6.0252 t6746 1/26/00 MULTI_OPEN_SUPPORT_BY_ROW_AND_BY_COL_APPEND
		if(FDLOG.MultiOpen.ComboSel==3) // append as new row, will change into 3 after Irene's change in the index problem
			open -ar %A;
		else
			open -a %A;		//Import into new columns in active wks
	}
	else
	{
		Fdlog.GetTemplate(B,ii);	
		win -t data "%B";		//Open a new wks template for each file
		open -w %A;	

		/// EJP 07-10-2003 v7.0622 QA70-4745 SET_PAGE_IMPORT_INFO_ON_123_ASC_IMPORT
		set_ascii_import_page_info(%A);
		/// end SET_PAGE_IMPORT_INFO_ON_123_ASC_IMPORT
	}
	return 0;

[OpenFileWksGraphActive]

	Fdlog.GetTemplate(B,ii);	
	win -t data "%B";		//Open a new wks template for each file
	open -w %A;	
	return 0;

////////////////////////////////////////////////////////
/// RKM: Multi Import for Graphs
////////////////////////////////////////////////////////
[MultiImportGraph]
	run.section(,Init);
	//JMP v4.961 	03/04/97 Use_New_MultiOpen_Dialog
	FDLOG.multiopen.colview=13;	///12/7/98 new property for dialog options
	FDLOG.UseGroup(Ascii);		
	FDLOG.Message$="";
	FDLOG.CheckName$=$File.ImportToWKS;
	FDLOG.CheckStatus=0;	//Default check box to on
	FDLOG.MultiOpen.ColToggle=3;	//Enable the Template column toggling with the checkbox

	if (FDLOG.multiopen()==0/0)
		return 1;

	if(FDLOG.CheckStatus==1)
	{
		loop(ii,1,FDlog.MultiOpen.Count)
		{
			FDlog.Get(A, ii);
			if(run.section(,OpenFileWksGraphActive)!=0) 
			{
				page.closebits=2;
				win -ca;
				continue;	//If non-ASCII file, continue with loop
			}
		}
	}
	else
	{
		loop(ii,1,FDlog.MultiOpen.Count)
		{
			FDlog.Get(A, ii);
			FDlog.GetColStr(B, ii);
			if(run.section(,OpenFileGraph)!=0) 
			{
				continue;
			}
		}
	}
	return 0;

[MultiImportToolbar]
	switch (exist(%H,0))
	{
	case 2:
		//wks
		run.section(,MultiImportWKS);
		break;
	case 3:	
		//graph
		run.section(,MultiImportGraph);
		break;
	default:	
		//matrix layout notes
		run.section(,MultiImportDefault);
		break;
	}
	return 0;

[MultiImportDefault]
	run.section(,Init);
	FDLOG.multiopen.colview=14;	//display Filename, Size  Modified and Template
	FDLOG.UseGroup(Ascii);	
	FDLOG.Checkname$="";	
	FDLOG.Message$=$File.ImportToWKS;

	if (FDLOG.multiopen()==0/0)
		return 1;
	
	//------------------- CPY v6.0252 t6746 1/26/00 MULTI_OPEN_SUPPORT_BY_ROW_AND_BY_COL_APPEND	
	FDLOG.multiopen.ComboSel=2;// import multi files as new columns in current worksheet
	//------------------- end t6746

	loop(ii,1,FDlog.MultiOpen.Count)
	{
		FDlog.Get(A, ii);
		if(run.section(,OpenFileWks)!=0) 
		{
			page.closebits=2;
			win -ca;
			continue;	//If non-ASCII file, continue with loop
		}
	}
	return 0;

[OpenFileGraph]
	open -P %B %A;
	return 0;

/////////////////////////////////////////////////////////
[ImportAscii]
	/////////////////////////////////////////////////////////
	// Note: ImportASCII is also available from standard toolbar when Excel is active
	/////////////////////////////////////////////////////////

	run.section(,Init);
	//JMP v4.978	4/25/97 USE_TRACKING_OF SINGLE EXTENSION TYPES
	FDLOG.UseGroup(Ascii);			//Automatically set up dialog for using ASCII extensions with user preference
	FDLOG.OptionDLG$="ImpASCII";		//Set option button to on and set text
	//JMP, v5.0 01/16/96 PARTIAL_CHECK				
	if (exist(%H)==2)
		FDLOG.checkname$=$DialogBox.PartialImport;			//Set check box to read Partial Import
	
	FDLOG.DlgName$=$DialogBox.ImportTitle;
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.path$;
	//--- CPY 10/26/03 QA70-3096 WKS_IMPORT_CHK_FILE_NAME_ALLOW_USE_ORIGINAL_WKS
	// following code will allow warning of file already imported, but since not implemented in importwz,we will turn if off for now
	// to keep consistent, may bring this back later
	//ii = check_wks_same_file_set_active(%B%A);
	//if(1 == ii)
	//	return 0;
	//---
	if (exist(%H)==2)
		wks.import.partial=FDLOG.checkstatus;
	
	Open -w %B%A;
	/* Open the file in %A into the current worksheet window */

	/// EJP 07-10-2003 v7.0622 QA70-4745 SET_PAGE_IMPORT_INFO_ON_123_ASC_IMPORT
	set_ascii_import_page_info(%B%A);
	/// end SET_PAGE_IMPORT_INFO_ON_123_ASC_IMPORT
	
	set %H -ue;					//Update window incase this wks is an Excel wks
	if (exist(%H)==5)				//Set X and Y values of matrix to number rows and columns
	{
		matrix -pg Dim ii jj;
		matrix -ps X 1 ii;
		matrix -ps Y 1 jj;
	}	
	return 0;

/////////////////////////////////////////////////////////
[ImportLotus]
	run.section(,Init);
	FDLOG.UseGroup(Lotus);
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.Path$;
	open -WF %B%A;
	return 0;

/////////////////////////////////////////////////////////
// JMP V4.11 7/18/96 EXCEL32DBASE32 BEGIN
/////////////////////////////////////////////////////////
[ImportExcel32]
	run.section(,Init);
	FDLOG.UseGroup(ImportExcel);
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.Path$;

	switch(FDLOG.DefType)
	{
	  case 1:
	    open -WE XLS2 %B%A;
	    break;
	  case 2:
	    open -WE XLS3 %B%A;
	    break;
	  case 3:
	    open -WE XLS4 %B%A;
	    break;
	}
	return 0;

/////////////////////////////////////////////////////////
[ImportDBase32]
	run.section(,Init);
	FDLOG.UseGroup(Dbase);
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.Path$;
	switch(FDLOG.DefType)
	{
	  case 1:
	    open -WE DBF4 %B%A;
	    break;
	  case 2:
	    open -WE DBF3PLUS %B%A;
	    break;
	  case 3:
	    open -WE DBF3 %B%A;
	    break;
	  case 4:
	    open -WE DBF2 %B%A;
	    break;
	}
	return 0;

/////////////////////////////////////////////////////////
// JMP V4.11 7/18/96 EXCEL32DBASE32 END
/////////////////////////////////////////////////////////

[ASCIIExport]
	run.section(,Init);
	FDLOG.default$=%H;
	FDLOG.UseGroup(Ascii);
	page.getfilename(L);	// get the file name into %L (window label or, if no label, name)

	FDLOG.DlgName$=$DialogBox.ExportTitle;
	if (FDLOG.SaveAs(A))
		return 1;

	i=(wks.export.cntrl&1)?1:0; /* include header */
	j=wks.sel>1?1:0;	//CHECK_MULTICELL_SELECTION
	l=(wks.export.cntrl&4)?1:0; /* include label */

	k=1;
	%K=$General.Tabs; /* separator choices */
	wks.export.c1=wks.c1;
	wks.export.c2=wks.c2;
	wks.export.r1=wks.r1;
	wks.export.r2=wks.r2;

	//Initialize separator list pointer to current separator
	//Note that the string property has actual separator, not escape sequence characters
	%B=wks.export.separator$;
	if ("%B"=="	")
		k=1;
	if ("%B"==",")
		k=2;
	if ("%B"==" ")
		k=3;
	if ("%B"==",	")
		k=4;
	if ("%B"==", ")
		k=5;

	//JMP v4.9983	7/01/97	EXPORT_LABELS
	if (FDLOG.DefType==3)
	{
		getn
			$file.ASCIIExportHeader	 i:2
			$file.ASCIIExportLabels l:2
			$file.ASCIIExportSelection j:2
			$file.ASCIIExportASCII;
		k=2;						//Set Delimiter to Comma
	}
	else
	{
		getn
			$file.ASCIIExportHeader	 i:2
			$file.ASCIIExportLabels l:2
			$file.ASCIIExportSelection j:2
			$file.ASCIIExportSeparator k:K
			$file.ASCIIExportASCII;
	}

	j=1-j;	/* inverse j */
	l=l?4:0;						//Set label value to 4

	wks.export.cntrl=i|l;					//Export Column Name plus Label givs 1 BitwiseOR 4 = 5

	if(j)
	{
		/* ignore selection, export whole worksheet */
		wks.export.cntrl+=2;
		#!type no selection;
	}
	else
	{
		/// SY 07-25-2003 QA70-4901 v7.0636 FIX_EXPORT_ASCII_SELECTION
		// Using new WKS_EXPORT_SELECTED flag for exporting selection
		wks.export.cntrl += 8;
		/// end FIX_EXPORT_ASCII_SELECTION

		if(wks.sel == 0)
		{
			type -b;					//BEEP!
			type -b $worksheetTool.NoData;
			return 1;
		}
	}

	switch(k)
	{
	case 1:
		wks.export.separator$="\t";
		break;
	case 2:
		wks.export.separator$=",";
		break;
	case 3:
		wks.export.separator$=" ";
		break;
	case 4:
		wks.export.separator$=",\t";
		break;
	case 5:
		wks.export.separator$=", ";
	break;
	};
	%B=FDLOG.path$;
	save -WH %H %B%A;
	return 0;

///////////////////////////////////////////////////////////////////////////////
[CSVexport]

	run.section(,Init);
	FDLOG.default$=%H;
	FDLOG.UseGroup(CSV);

	page.getfilename(L);	// get the file name into %L (window label or, if no label, name)
	%L=%[%L,'.'];		// Parse out FileName apart from file extension

	FDLOG.DlgName$=$DialogBox.ExportCSVTitle;
	if (FDLOG.SaveAs(A))
		return 1;

	wks.export.c1=wks.c1;
	wks.export.c2=wks.c2;
	wks.export.r1=wks.r1;
	wks.export.r2=wks.r2;

	wks.export.cntrl=3;	//Export Header with Entire Worksheet Data

	wks.export.separator$=",";
	%B=FDLOG.path$;
	save -WH %H %B%A;
	return 0;

///////////////////////////////////////////////////////////////////////////////
// CPY v6.1018 8/4/00 MOVE_EXPORT_PAGE_TO_GRAPHEXP
// this used to be where the [ExportPage] section was
////////////////////////////////////////////////////////////////////////////////////////////

//-------------------------- CPY v6.1018 8/10/00 MOVE_IMAGE_IMPORT_EXPORT
//------- CPY v6.0294 t8126 6/27/00  IMPORT_IMAGE_INTO_MATRIX
//-------- end t8126 6/27/00

//----------- CPY v6.1006 7/22/00 t8211 MATRIX_IMAGE_EXPORT
//
//----------- end CPY v6.1006 7/22/00 t8211 MATRIX_IMAGE_EXPORT
//-------------------------- end CPY v6.1018 8/10/00 MOVE_IMAGE_IMPORT_EXPORT

////////////////////////////////////////////////////////////////////////////////////////////
[FilterImport]
	run.section(,Init);
	GetFileName *.%1;
	open -WF %B%A; //GetFileName sets %A and %B
	return 0;

////////////////////////////////////////////////////////////////////////////////////////////////////////

[Exit]
	exit;
////////////////////////////////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////
[Spreadsheet]
	run.section(,Init);
	FDLOG.NumTypes=14;
	FDLOG.Type1$	=$DialogBox.ImportDBaseII;
	FDLOG.Type2$	=$DialogBox.ImportDBaseIII;
	FDLOG.Type3$	=$DialogBox.ImportDBaseIII+;
	FDLOG.Type4$	=$DialogBox.ImportDBaseIV;
	FDLOG.Type5$	=$DialogBox.ImportDIF;
	FDLOG.Type6$	=$DialogBox.ImportExcelV2X;
	FDLOG.Type7$	=$DialogBox.ImportExcelV3X;
	FDLOG.Type8$	=$DialogBox.ImportExcelV40;
	FDLOG.Type9$	=$DialogBox.ImportLotusV1X;
	FDLOG.Type10$	=$DialogBox.ImportLotusV2X;
	FDLOG.Type11$	=$DialogBox.ImportLotusV3X;
	FDLOG.Type12$	=$DialogBox.ImportLotusV4&5X;

	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.path$;
	if (System.Path.SavePath)
		System.Path.AppData$ = %B;

	switch(FDLOG.DefType)
	{
	  case 1:
	    open -WE DBF2 %B%A;
	    break;
	  case 2:
	    open -WE DBF3 %B%A;
	    break;
	  case 3:
	    open -WE DBF3PLUS %B%A;
	    break;
	  case 4:
	    open -WE DBF4 %B%A;
	    break;
	  case 5:
	    open -WE DIF %B%A;
	    break;
	  case 6:
	    open -WE XLS2 %B%A;
	    break;
	  case 7:
	    open -WE XLS3 %B%A;
	    break;
	  case 8:
	    open -WE XLS4 %B%A;
	    break;
	  case 9 to 12:
	    open -WF %B%A;
	    break;
	  case 13:
	    run.section(,SPWIN);
	    break;
	  case 14:
	    run.section(,SPDOS);
	    break;
	}
	return 0;


///////////////////////////////////////////////////
[ImportDIF]
	run.section(,Init);
	FDLOG.UseGroup(DIF);
	if(FDLOG.Open(A))
		return 1;
	%B=FDLOG.path$;
	open -WF %B%A;
	return 0;

[ScriptOpen]
	run.section(,Init);
	FDlog.UseGroup(Script);
	if(FDlog.Open(A))
		return 1;
	%B=FDlog.Path$;
	type -o open %B%A;
	return 0;

[ScriptSaveAs]
	run.section(,Init);
	FDlog.UseGroup(Script);
	if(FDlog.SaveAs(A))
		return 1;
	%B=FDlog.Path$;
	type -o save %B%A;
	return 0;

[NotesSaveAs]
	run.section(,Init);
	FDlog.UseGroup(Notes);
	FDlog.Default$=%2;
	if(FDlog.SaveAs(A))
		return 1;
	%B=FDlog.Path$;
	save -n "%1" %B%A;
	return 0;

[ExportButtonGroup]
dll -a OPack OPack; // temporary code
OPack.GetFileNames(%YExpGroup.tmp);
OPack.Pack(%1);
OPack.Reset();


[PrepareCopyFormats]
	if(run.LoadOC(Originlab\theme_utils.c) != 0)
	{
		type -a "Compiler error, cannot compile theme_utils.c";
		return 1;
	}
	return 0;
	
[PreparePasteFormats]
	if(run.loadOC(Originlab\ApplyFormats.c) != 0)
	{
		type -a "Compiler error, cannot compile ApplyFormats.c";
		return 1;
	}
	return 0;
		

[FmtsCopyAll]
	//run.loadOC(Originlab\ApplyFormats.c);
	run.section(,PrepareCopyFormats);
	CopyFormat;

[FmtsCopyAllStyles]
	run.section(,PrepareCopyFormats);
	CopyFormatAllStyles;

[FmtsCopyColors]
	run.section(,PrepareCopyFormats);
	CopyFormatColors;

[FmtsCopyFonts]
	run.section(,PrepareCopyFormats);
	CopyFormatFonts;

[FmtsCopyScales]
	run.section(,PrepareCopyFormats);
	CopyFormatScales;

[FmtsCopyDimensions]
	run.section(,PrepareCopyFormats);
	CopyFormatDimensions;

[FmtsCopyText]
	run.section(,PrepareCopyFormats);
	CopyFormatText;

[FmtsCopyBackground]
	run.section(,PrepareCopyFormats);
	CopyFormatBackground;

[FmtsCopyPlot]
	run.section(,PrepareCopyFormats);
	CopyFormatPlot;

/// RVD 9/15/2003 QA70-5179 v7.0695 THEME_SPECIAL_CONTEXT_MENU
[FmtsCopySpecial]
	run.section(,PrepareCopyFormats);
	CopyFormatSpecial %1;
/// end THEME_SPECIAL_CONTEXT_MENU

[PasteFormatsDlg]
	run.section(,PreparePasteFormats);
	PasteFormatsDialog 2;


[PasteFormats]
//%L = C:\c\vc32\themetemp.xml;
//page -apx -S %L;
//page -apx -L %L;
	run.section(,PreparePasteFormats);
	if(@KS)	 // shift select
		PasteFormatsDialog 1;
	else
		PasteFormatsDialog 0;


[ImportWizard]
	run.LoadOC(OriginLab\ImportWiz.ocw);
	ImportWizard("");
	return 0;

[ImportMatlab]
	run.LoadOC(OriginLab\MatLabImport.c);
	MatlabWorkspaceImport;
	return 0;
	
[ImportMatFile]
	run.LoadOC(OriginLab\MATFILEImportDlg.c);
	MatlabMatFileImportDlg;
	return 0;


[MATLABConsole]
	run.LoadOC(OriginLab\MatLabImport.c);
	run.LoadOC(OriginLab\MatLabConsole.c);
	MatlabConsole;
	return 0;

[LabView]
	run.LoadOC(Originlab\LabVIEWImport);
	//run.LoadOC(Originlab\tree_utils);	///	DVT 4/11/03 REMOVE_TREE_UTILS_FROM_LVDLG
	//run.LoadOC(OriginLab\LVDlg);
	//LabViewWorkspaceImport;
	LabViewWorkspaceImportDlg;
	return 0;

[ThemeGallery]
	if(run.LoadOC(Originlab\ThemeGallery.c) ==0)
	{
		ThemeGallery;
		return 0;
	}
	type -a "Error in compilation!";
	return 1;

[FmtsSaveAsTheme]
	if(run.section(,PrepareCopyFormats) ==0)
	{
		err = run.LoadOC(Originlab\SaveFormatAsTheme.c);
		if(err==0)
		{
			SaveFormatAsTheme;
			return 0;
		}
	}
	type -a "Error in compilation!";
	return 1;

[BatchProcessing]
	run.LoadOC(OriginLab\BatchProcessing.ocw);
	BatchProcessing;
	return 0;

[FILEEXT]
NUMGROUPS=26
1_NAME=Origin
1_NUMTYPES=8
1_TYPE1=$FileType.Project
1_TYPE2=$FileType.Document
1_TYPE3=$FileType.Wks
1_TYPE4=$FileType.Graph
1_TYPE5=$FileType.Matrix
1_TYPE6=$FileType.AscData
1_TYPE7=$FileType.Notes
1_TYPE8=$FileType.OriginProg
2_NAME=Excel
2_NUMTYPES=1
2_TYPE1=$FileType.Excel
3_NAME=Template
3_NUMTYPES=3
3_TYPE1=$FileType.GraphTemp
3_TYPE2=$FileType.WksTemp
3_TYPE3=$FileType.MatrixTemp
4_NAME=ASCII
4_NUMTYPES=4
4_TYPE1=$FileType.Dat
4_TYPE2=$FileType.TXT
4_TYPE3=$FileType.CSV
4_TYPE4=$FileType.AllFiles
5_NAME=Lotus
5_NUMTYPES=4
5_TYPE1=$FileType.LotusV4&5X
5_TYPE2=$FileType.LotusV3X
5_TYPE3=$FileType.LotusV2X
5_TYPE4=$FileType.LotusV1X
6_NAME=ImportExcel
6_NUMTYPES=3
6_TYPE1=$FileType.ExcelV40
6_TYPE2=$FileType.ExcelV3X
6_TYPE3=$FileType.ExcelV2X
7_NAME=Dbase
7_NUMTYPES=4
7_TYPE1=$FileType.DBaseIV
7_TYPE2=$FileType.DBaseIII+
7_TYPE3=$FileType.DBaseIII
7_TYPE4=$FileType.DBaseII
8_NAME=DIF
8_NUMTYPES=1
8_TYPE1=$FileType.DIF
9_NAME=Labtech
9_NUMTYPES=1
9_TYPE1=$FileType.LabTech
10_NAME=Sound
10_NUMTYPES=1
10_TYPE1=$FileType.WAV
11_NAME=Mathematica
11_NUMTYPES=1
11_TYPE1=$FileType.Mathematica
12_NAME=Kaleidagraph
12_NUMTYPES=2
12_TYPE1=$FileType.Kaleidagraph
12_TYPE2=$FileType.AllFiles
13_NAME=Image
13_NUMTYPES=18
13_TYPE1=$FileType.AI
13_TYPE2=$FileType.BMP
13_TYPE3=$FileType.CGM
13_TYPE4=$FileType.DXF
13_TYPE5=$FileType.EPS
13_TYPE6=$FileType.GIF
13_TYPE7=$FileType.JPG
13_TYPE8=$FileType.PCX
13_TYPE9=$FileType.PNG
13_TYPE10=$FileType.TGA
13_TYPE11=$FileType.PDF
13_TYPE12=$FileType.PSD
13_TYPE13=$FileType.TIF
13_TYPE14=$FileType.EMF
13_TYPE15=$FileType.XPM
13_TYPE16=$FileType.XWD
13_TYPE17=$FileType.WMF
13_DEFTYPE=5
14_NAME=CSV
14_NUMTYPES=1
14_TYPE1=$FileType.CSV
15_NAME=pClamp
15_NUMTYPES=3
15_TYPE1=$FileType.Abf
15_TYPE2=$FileType.Dat
15_TYPE3=$FileType.AllFiles
16_NAME=Script
16_NUMTYPES=3
16_TYPE1=$FileType.Script
16_TYPE2=$FileType.TXT
16_TYPE3=$FileType.AllFiles
17_NAME=Notes
17_NUMTYPES=3
17_TYPE1=$FileType.TXT
17_TYPE2=$FileType.Script
17_TYPE3=$FileType.AllFiles
18_NAME=Editor
18_NUMTYPES=4
18_TYPE1=$FileType.Script
18_TYPE2=$FileType.Procedure
18_TYPE3=$FileType.Initialize
18_TYPE4=$FileType.TXT
19_Name=SigmaPlot
19_NUMTYPES=3
19_TYPE1=$FileType.SigmaJNB
19_TYPE2=$FileType.SigmaWin
19_TYPE3=$FileType.SigmaDOS
20_Name=ODAQ
20_NUMTYPES=1
20_TYPE1=$FileType.ODAQ
21_Name=ThermoGalacticSPC
21_NUMTYPES=1
21_TYPE1=$FileType.SPC
22_Name=MiniTab
22_NUMTYPES=2
22_TYPE1=$FileType.MiniTabMTW
22_TYPE2=$FileType.MiniTabMPJ
23_NAME=OriginC
23_NUMTYPES=9
23_TYPE1=$FileType.C
23_TYPE2=$FileType.CPP
23_TYPE3=$FileType.FIT
23_TYPE4=$FileType.H
23_TYPE5=$FileType.OGS
23_TYPE6=$FileType.OP
23_TYPE7=$FileType.TXT
23_TYPE8=$FileType.OriginCFiles
23_TYPE9=$FileType.OriginCTextFiles
24_NAME=OriginCWorkspace
24_NUMTYPES=1
24_TYPE1=$FileType.OriginCWorkspace
25_NAME=OPack
25_NUMTYPES=1
25_TYPE1=$FileType.OPack
26_NAME=Samples
26_NUMTYPES=6
26_TYPE1=$FileType.Project
26_TYPE2=$FileType.C
26_TYPE3=$FileType.CPP
26_TYPE4=$FileType.H
26_TYPE5=$FileType.OGS
26_TYPE6=$FileType.AllFiles
