Start » Filter Reference » System » File System » SaveObject

SaveObject


Module: FoundationLite

Saves an object to a file.

Name Type Description
Input value
inObject T Object to be saved.
Input value
inStreamMode StreamMode Binary or text format of the file.
Input value
inFile File Input file path.

The type of this filter is defined using the type variable T which represents any valid type. Read more.

Examples

Description of usage of this filter can be found in examples and tutorial: Hand-Eye Calibration - On Filters, Preparing an OCR model.

Remarks

Stream Modes
It is recommended to use the Binary stream mode for saving an object to a file as it is more efficient and works with all data types. The Text mode is more human-friendly, so it should be chosen if humans are expected to read or modify the file.
File Naming Conventions
It is recommended to name the files with the following double file extension: .<typeName>.avdata, where <typeName> is the instance type.
Working with Saved Objects
There are three ways to load the saved objects in Aurora Vision Studio:
  • using the LoadObject filter with the same instance type,
  • using the command Load from File... from a filter input's context menu in the Program Editor (only binary files),
  • using the command Link to a File... from a filter input's context menu in the Program Editor (only binary files).
Possible Errors
  • [Io Error] Unable to open file for writing in SaveObject.
    You may have no write permission for the current working directory. If the project has not been saved yet, the working directory is typically in C:\Program Files and this message appears. Save the project to solve the problem.

Complexity Level

This filter is available on Basic Complexity Level.

See Also