Synopsis

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

Purpose

Format an IGES model out as an ASCII IGES file.

Description

Main routine for formatting a model into an ASCII IGES file. Unless one of the ordering options is specified, the entities will be written to the output file in sequential order. If the model was created with the ASCII IGES parser, the entity ordering will match that of the original IGES file.

Input

option

IAFF_OVERWRITE

If the destination file already exists it is to be overwritten. The default is to return an error if the file already exists.

IAFF_ORDER_DEFS

Write entities so that referenced entities occur in the file before their referencing entity. Note that this does not apply to the 132 entity which has a pointer to its parent. Backpointers are not taken into consideration when doing the ordering. This option requires substantially more overhead than the default.

IAFF_DBL_TO_FLT

When formatting double field, write them out as single precision. The default is to write them out as double precision fields (i.e. always followed by a Dn).

IAFF_JAMA_IS

Make the output file syntactically conform to the JAMA-IS subset. This option will force fields 1 and 2 of the Global section to be written as strings rather than default fields when the values of "," and ";" are used. The JAMA-IS subset does not allow any Global or PD fields to be defaulted. Since the parser will write a default field for any zero length text strings, the application must ensure that there are no zero length strings in the model before calling the formatter. This option does not do any verification that the entities in the model conform to the JAMA-IS subset.

model

Model to be formatted

file_name

Name of file to be created

func

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

Return

IAFF error code, if not IAFF_NOERR, mpm_DumpStack can be called to print the specifics of the error.