LabWindows/CVI

FPGenCreateFunctionTree

FPGenCreateFunctionTree

LabWindows/CVI ActiveX Server Interface

CVI_AppFPGenCreateFunctionTree (CAObjHandle objectHandle, ERRORINFO *errorInfo, const char *fpFilePathname, const char *instrName, const char *instrPrefix, const char *qualifierStr, enum CVIEnum_CVIFPVersion fpVersion, long *treeId, long *returnValue);


Note  This function signature is shown as it appears when you create a client using the LabWindows/CVI ActiveX Controller Wizard. If you create a client for the LabWindows/CVI ActiveX server interface using a different development environment, this function might be exposed differently. Some of the parameters documented here, such as objectHandle or errorInfo, are not applicable if you write a client using a different development environment.

Purpose

Creates a new function tree and destroys the current contents of the existing file.

Parameters

Input
Name Type Description
objectHandle CAObjHandle Specifier for a particular ActiveX object that is currently in memory. Obtain this handle from CVI_NewApp, CVI_OpenApp, CVI_ActiveApp, or an ActiveX method or property.

All of the methods that you can apply to a particular object are grouped under a single class in the function tree. The name of the class corresponds to the type of the object to which this handle refers.
fpFilePathname const char * The absolute pathname of the function panel file to create.
instrName const char * The name of the instrument to create. This name can be up to 40 characters long.
instrPrefix const char * The prefix LabWindows/CVI adds to the beginning of each function name in the function tree. If you are using LabWindows/CVI 5.0.1 and earlier as the default format, the prefix cannot exceed eight characters. If you are using LabWindows/CVI 5.5 and later as the default format, the prefix cannot exceed 31 characters. Do not include the underscore (_) separator in the prefix. LabWindows/CVI adds the underscore (_) separator to the prefix before appending the function name to it.
qualifierStr const char * The default qualifier string that provides information to LabWindows/CVI about access options and conventions. LabWindows/CVI uses this qualifier for all functions in the instrument driver unless a function specifies a different qualifier. The default qualifier is valid only if you specify LabWindows/CVI 5.5 and later or LabWindows/CVI 8.5 and later as the default format.
fpVersion enum CVIEnum_CVIFPVersion The default format for function panels in the tree. The format affects the maximum lengths of names in the .fp file and what features are supported. Unless otherwise noted, all features in earlier formats are supported in subsequent formats. You can specify one of the following constants:

  • CVIConst_CVI_FPVERSION_USE_ENV_SETTING (0)—The function tree uses the format specified in the FP File Format dialog box in the LabWindows/CVI environment.
  • CVIConst_CVI_FPVERSION_501 (1)—The function tree uses the LabWindows/CVI 5.0.1 and earlier format. Default text for output controls, function qualifiers, and the option to set precision on numeric controls are not supported in this format.
  • CVIConst_CVI_FPVERSION_55 (2)—The function tree uses the LabWindows/CVI 5.5 and later format. Default text for output controls, function qualifiers, and the option to set precision on numeric controls are supported in this format.
  • CVIConst_CVI_FPVERSION_85 (3)—The function tree uses the LabWindows/CVI 8.5 and later format. Support for the 64-bit integer data type is also available in this format.
Output
Name Type Description
errorInfo ERRORINFO * When an ActiveX server function fails with the error code DISP_E_EXCEPTION, descriptive information about the error code is stored in this parameter. The information can include the error code, source, and description. It also can include a help file and help file context ID.

When an ActiveX server function fails with the error codes DISP_E_PARAMNOTFOUND, DISP_E_TYPEMISMATCH, or E_INVALIDARG, the parameter position of the invalid argument may be stored in the errorParamPos member of this parameter.

You can pass NULL for this parameter.
treeId long * The ID of the function tree LabWindows/CVI creates.
returnValue long * The value that the LabWindows/CVI ActiveX server function returns. A negative value indicates that the LabWindows/CVI ActiveX server function returned an error.

You can use GetCVIAutomationServerErrorString to get the description of a LabWindows/CVI ActiveX server error code.

Return Value

Name Type Description
status HRESULT A value indicating whether an error occurred. A negative error code indicates function failure.

Error codes are defined in CVIversion\include\cviauto.h and <Program Files>\National Instruments\Shared\MSDTRedistributables\SDKHeaderFiles\8.1\winerror.h.

You can use CA_GetAutomationErrorString to get the description of an ActiveX Library error code.