Synopsis

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

Purpose

Format a STEP model out as an ASCII STEP (Part 21) file.

Description

Main routine for formatting a model into an ASCII STEP file. The entity type may be written out using long or short_names. Unless one of the ordering options is specified, the entities will be written to the output file in sequential order.

Input

option

SAFF_OVERWRITE

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

SAFF_ORDER_DEFS

Write entities so that referenced entities occur in the file before their referencing entity. Backpointers are not taken into consideration when doing the ordering. This option requires substantially more overhead than the default. (This option is not implemented yet.)

SAFF_DBL_TO_FLT

When formatting double fields, write them out as single precision; default is to write fields out as double precision.

SAFF_SHORT_NAMES

Each entity may have a short name associatted with it. If the short name exists, it is stored in the entitys decription. This option will force the formatter to use the short_name if it exists. (Default is to write out long names)

SAFF_FORMAT_IS

Format the file with respect to Part 21 IS. By default, the file will be formatted according to the Part 21 Technical Corrigendum.

SAFF_ORIG_PFID

Use original PFID values stored in entities from parsing. Only valid when model was populated by safp_ParseFile.

SAFF_TRUNCATE_ZEROS

Truncate trailing zeros when formatting floating point values.

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

SAFF error code, if not SAFF_NOERR, mpm_DumpStack can be called to print the specifics of the error.