api_save_entity_list_file
List of: Functions
Subjects: SAT Save and Restore
Contents: Kernel

Action: Writes a list of entities to disk in text or binary format.

Prototype: outcome api_save_entity_list_file (


FileInterface* file_ptr,

// open file






// descriptor


ENTITY_LIST const& entity_list, // returns






// entities to be






// saved


AcisOptions* ao = NULL // acis options


);

Includes: #include "kernel/acis.hxx"

#include "kernel/kernapi/api/api.hxx"

#include "kernel/kernapi/api/kernapi.hxx"

#include "kernel/kerndata/lists/lists.hxx"

#include "kernel/kernutil/fileio/fileif.hxx"

#include "kernel/kernapi/api/acis_options.hxx"

Description: This API creates the file pointer argument an open file positioned at the point where this API begins the entity save. When the save is complete, the file will be correctly positioned at the end of the entity save; therefore, an application can save multiple bodies intermixed with other application specific data in a single save file.


The entity is written to disc as a sequence of records, one per model entity. Writing records in binary is roughly twice as fast as writing in text and the files are some 20 per cent shorter. However, use binary save files only for short-term storage. Write and read binary files only by the same version of ACIS, running on the same type of hardware and with the same set of application-derived classes such as attributes.


Each entity record begins with a string identifier denoting its type. When a text file (only) is restored, records of unrecognized derived classes will be ignored. The floating point precision for real numbers in text files is six digits for single precision and 15 digits for double precision.


Beginning with ACIS release 6.3, it is required that the product ID and units be populated for the file header (using class FileInfo) before you can save a SAT file. Refer to the reference templates for the class FileInfo and function api_set_file_info for more information.

Errors: Failed to save entity; e.g., unable to write to disc file.

Library: kernel

Filename: kern/kernel/kernapi/api/kernapi.hxx

Effect: Read-only
PDF/KERN/16FNA.PDF
HTM/DATA/KERN/KERN/16FNA/0141.HTM