ADDIN_AddToUI

ADDIN_AddToUI adds a function to the UniPlot user interface.

b = ADDIN_AddToUI(nType, ssText, ssFunction)

Return Value

b is TRUE (1), when the function was successful and otherwise FALSE (0).

Parameters

nType

nType specifies to which group of commands the new command is added. The following groups are available:

Name Wert Bedeutung
ADDIN_FILE_IMPORT 1 Data file import functions
ADDIN_DATA_MOREXYDATAFUNCTIONS 2 More 2D dataset functions
ADDIN_DATA_MOREXYZDATAFUNCTIONS 3 More 3D dataset functions
ADDIN_FILE_MOREFUNCTIONS 4 More file functions
ADDIN_LAYER_MOREFUNCTIONS 5 More diagram functions
ADDIN_LOAD_FUNCTIONS 6 Dataset Load functions
ssText

ssText is a scalar string which will be displayed in the user interface.

ssFunction

ssFunction is a function name which will be invoked if the user selects on of the commands. The function name is given without parentheses “()”.

Example

ADDIN_AddToUI(ADDIN_FILE_IMPORT, "Excel - File (*.xls)|*.xls|", "_DoImportExcelFile")

Comment

ADDIN_FILE_IMPORT: The text of the parameter ssText will be displayed in the type field in the file-open dialog box. The search filter is added at the end of the text enclosed in OR (|) signs. Example: "Excel - File (*.xls)|*.xls|". The function name is set without the parentheses.

A function for the addin type ADDIN_FILE_IMPORT must return the complete file name of the created NC file. If the function cannot convert the given file it should return an empty string(“”). In case of an error the function must return the string "#IMPORTERROR#". Examples for functions that convert data files to nc files can be found in the directory \uniplot\addin\rs_fevis or \uniplot\addin\rs_combi.

ADDIN_LOAD_FUNCTIONS: For this type only the last part of the name is specified. See GridLoadCallback_xxx. Examples for load functions can be found in the file \uniplot\script\rs_loaddat.ic. Your filter should be saved in the autoload directory with the extension .ic.

ADDIN_DATA_MOREXYDATAFUNCTIONS, ADDIN_DATA_MOREXYZDATAFUNCTIONS, ADDIN_FILE_MOREFUNCTIONS, ADDIN_LAYER_MOREFUNCTIONS: For these types the complete file name must be specified. The functions do not any parameters. Examples can be found in the file \uniplot\script\rs_xy.ic.

id-1939877