ReadCDFFile (FPScript)

21.09.2021

Reads a z or r variable from a file in CDF format.

Syntax

ReadCDFFile(File, VariableNumber [ , XVariableNumber = 0 ])

 

The syntax of the ReadCDFFile function consists of the following parts:

Part

Description

File

String with the path of the CDF file to be read.

Permitted data structures are scalar value. Supported data types are string (file name).

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

VariableNumber

Number of the variables to be read out of the file. The r variables are numbered from 1 to N (N = number of r variables), z variables are numbered from N+1 to N+M (M = number of z variables).

Permitted data structures are scalar value. All integral data types are permitted.

If the argument is a list, then the function is executed for each element of the list and the result is also a list.

XVariableNumber

Number of variables to be specified as the X component of the variables specified in the second argument. If the number is greater than 0, a signal will be imported. Otherwise, the variable specified in the second argument will be imported as a scalar value, data series or data matrix.

Permitted data structures are scalar value. All integral data types are permitted.

If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated.

If this argument is omitted, it will be set to the default value 0.

Remarks

The function supports all CDF formats up to 2.7. When importing variables with calendar time values, make sure that they are interpreted as local times. Values before 1/1/1970 or after 1/18/2038 will be copied as void. The import supports only variables with up to two dimensions.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

ReadCDFFile("c:\\examples\\file.cdf", 1)

Import the first variable from a CDF file.

ReadCDFFile("c:\\examples\\file.cdf", 3, 1)

Import the third variable as a Y component and the first variable as an X component from a CDF file.

See Also

File Import

Share article or send as email:

You might be interested in these articles