Action:
|
Writes a list of entities to disk as text or binary.
|
|
Prototype:
|
outcome api_save_entity_list (
|
|
|
FILE* file_ptr,
|
// open file
|
|
|
|
|
// descriptor
|
|
|
logical text_mode,
|
// TRUE if file is text,
|
|
|
|
|
// FALSE if binary
|
|
|
ENTITY_LIST const&
|
// returns entities
|
|
|
|
entity_list,
|
// to save
|
|
|
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 "baseutil/logical.h"
|
|
#include "kernel/kernapi/api/acis_options.hxx"
|
|
Description:
|
The file pointer argument should be 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 entities are written to disk 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. It is recommended you use binary save files only for short-term storage. Write and read binary files only by the same version running on the same type of hardware.
|
|
|
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 can also occur if you use two different C runtime DLLs (e.g., one release and one debug) when using
ACIS. Refer to the "C Runtime Library DLL" section in the
Application Development Manual for more details.
|
|
|
Each entity record begins with a string identifier denoting its type. When a file 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.
|
|
Errors:
|
Failed to save entities; e.g., unable to write disk file.
|
|
Library:
|
kernel
|
|
Filename:
|
kern/kernel/kernapi/api/kernapi.hxx
|
|
Effect:
|
Read-only
|