# Synopsis

PDX_MSGT ddff_FormatFile(long option, char *file_name, MDA_ENT_FUNC *func)

# Purpose

Write the current DXF model out as a DXF/DWG file.

# Description

This is the main routine for formatting a model into a DXF/DWG file. It will allocate the global DD structures, initialize DD, and create a new file for output. The model is traversed and PDELIB entities are organized into lists according to their DD classification (Object, Entity, Table, etc..). These lists are then traversed and the entities formatted in ddff__DispatchEntries. Version and Filetype information is obtained via dxfi_GetFileVersion and dxfi_GetFileType macros, and used when the file is actually saved to disk.

To setup a callback function to show the percentage of the file that has been formatted, call the function ddff_PercentageFormatted(). For more information see ddff_PercentageFormatted

# Input

## option

Option (not used)

## file_name

Name of file to be created

## func

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

# Return

DDFF error code.