Synopsis

PDX_MSGT iafp_ParseFile(long option, int model, char *file_name, MDA_ENT_FUNC *func)

Purpose

Read an ASCII IGES file into a model.

Description

The specified IGES file is parsed into a model. The type of IGES file will be determined automatically, however, only ASCII files are currently supported. Other file types will cause an error to be returned. Recoverable errors (such as an incorrect field type) will generate warning/error messages. Non-recoverable errors (such as an invalid record delimiter) will cause an error to be set on the error stack and an error number to be returned.

Input

option

IAFP_OVRWRT_OPT

If model contains entities, delete them before parsing the file (i.e. start with a clean model)

IAFP_ASSUME_FORM_0

If an unknown type/form is found and form 0 is a known form for the type, the parser will force the form to be 0 and parse the entity. If the model is subsequently formatted, the form will remain as 0 (i.e. it will not be set back to that found in the original file).

IAFP_HEADER_ONLY

Parse the start and global sections only. After parsing, the model will only contain the iges global and iges start entities. Before parsing the entire file, the model must be freed and reallocated.

model

Model to place the entities in. The model must already be allocated with mda_AllocateModel.

file_name

Name of file to be parsed.

func

Function to be called with each entity after it is parsed or NULL if no function should be called. See mda_ParseFile for more information.

Return

IAFP error code, if not IAFP_NOERR, mpm_DumpStack can be called to print the specifics of the error.