Synopsis

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

Purpose

Read a STEP file into a model.

Description

The specified STEP file is parsed into a model. The STEP file must conform to the correct version of STEP Part 21 edition 3. The parser supports entity long and short names. The short names must be incorporated into the ddf file (usually through the exp2ddf compiler) in order to be recognized. If there are any short/long name collisions, the short name has a higher precedence and will be recognized. Recoverable errors (such as an incorrect field type) will generate warning/error messages. Non-recoverable errors (such as an invalid file type) will cause an error to be set on the error stack and an error number to be returned.

Input

option

SNFP_OVRWRT_OPT

If model contains entities, go ahead and parse the file. The resultant model will contain the new entities added to the existing model. If this option is not passed and their are more than 2 entities in the model, then the parser will not read the file.

SNFP_HEADER_ONLY

Parse the header section only. After parsing, the model will only contain the file description, file name, and file schema 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

SNFP error code, if not 0, mpm_DumpStack can be called to print the specifics of the error.