Overview


The File Access library is located in the Accessories page of the Network Editor under Utility Modules. It contains a number of objects that allow you to import data from simple data files:

•      file -- Specifies a filename.

•      file_obj -- Reads data from an ASCII or binary input file

•      file_obj_bin -- Reads binary array data or binary scalar data from an input file

•      file_scalar_ascii -- Reads ASCII scalar data from an input file

•      file_array_ascii -- Reads an ASCII array from an input file

•      file_find_expr -- Searches for a pattern in an ASCII input file

•      file_skip_lines -- Moves the file offset for an ASCII input file by the specified number of lines

•      file_skip_words -- Moves the file offset for an ASCII input file by the specified number of words

You can use these objects to construct a mapping between an AVS/Express object and the data in a file. As the values in the AVS/Express object are accessed, AVS/Express automatically goes to the file to get the values.

This approach does not require writing any C/C++ code, but may be more difficult to learn to use than writing a simple C or C++ module that maps the data in the file to AVS/Express primitive data objects.

V access

The file objects can also be accessed through V, by prepending the module name with "FILE". For example, to create an instance of the file_scalar_ascii module, type:


-> FILE.file_scalar_ascii my_file_scalar_ascii;