2.1.11.6 nlsf_install_fdf


Description

Install a fitting function into Origin using its FDF file, optionally specifying the category to install it into.

It does not move the FDF file to the UFF- it stays in its original location.

It will overwrite an existing fitting function in the same category.

If no category is specified, the fitting function will be installed into the "User Defined" category.

Note: Built in fitting functions cannot be overwritten in their existing categories.

Syntax

bool nlsf_install_fdf(string strFile, string strCategory)

Parameters

strFile
[input] FDF file name including full path.
strCategory
[input] Optional category. If not specified, "User Defined" is used.

Return

Returns true if fitting function is actually installed.

Examples

Prior to compiling the following functions, you must run the following command via the Script or Command window:

Run.LoadOC(Originlab\nlsf_utils.c, 16);

EX

#include <Origin.h>
#include <..\originlab\NLFitSession.h>

// Installs FDF into "User Defined" category.
void InstallMyFdf1(){
	string strFile="C:\MyFitFunc.FDF";
	nlsf_install_fdf(strFile);
}

// Installs FDF into "My Funcs" category, creating the category if it does not exist.
void InstallMyFdf2(){
	string strFile="C:\MyFitFunc.FDF";
	nlsf_install_fdf(strFile, "My Funcs");
}

Calling from LabTalk

This function may be called via LabTalk like:

run.section(dofile.ogs, OnInstallFDF, "C:\MyFitFunc.FDF")

But it will only install into the "User Defined" category.

See Also

nlsf_uninstall_fdf