Synopsis

PDX_MSGT mda_RestoreModel(long option, char *file, int num_models, int *models)

Purpose

Restore a model from an ASCII or BINARY file.

Description

Restore the model saved in file. This function will be enhanced in the future to allow multiple models to be restored from a single model file. For now num_models is not used (but should be set to 1 for future compatibility) and only a single model may be specified.

If a function was defined for the pre_restore model_info field (see mda_GetModelDefaults), it will be called before the model is restored. The models specified in models must not contain any entities after the pre_restore function returns. After the model has been restored, the post_restore function will be called if defined.

See the mda_intro manual page for additional information about saving and restoring models.

Input

option

MDA_BINARY

restore from binary file

file

File to restore model from

num_models

Number of models to be restored (must be specified as 1)

models

Model to be restored (must be empty or a pre_restore function must be defined which deletes any entities in it)

Return

MDA error code