command to create OPX file

Version: 2019

Type: Features

Category: Programming

Subcategory: Labtalk

Jira: ORG-18254

InitFromIni method is added to OPXFile class to support using OriginC function to create app, so that user can easily creating opx without opening package manager dialog. this will be useful if user execute origin from command line or a windows BAT files.

note: this method require a source ini file which including all settings in package manager dialog.


#include <Origin.h>
#include <../OriginLab/OPXFile.h>
int test_ini_to_opx()
	OPXFile opx;
	int err = opx.InitFromIni("opx_IEVer.ini");
	if( err == 0 )
		if( !opx.Save() )
			printf("Failed saving.\n");
		printf("InitFromIni error %d\n", err);
	return 0;