################################################################
Creating a Model File Entity and Exporting It to a Physical File
################################################################

This section describes how to initiate the process of creating a model file and how to export that data to a physical file.

****************************************
Create a File That Contains the PRC Data
****************************************

.. code-block:: c

   A3DAsmModelFile* pModelFile = createModelFile();

Create the model file entity.
(See :doc:`building_prc_2`.)

Save the contents of the model file to a physical file by invoking the :func:`A3DAsmModelFileWriteToFile` function.

.. code-block:: c

   if (p != NULL) {
     if (_access(pcPRCName, 00) != -1)
       _unlink(pcPRCName);
     A3DInt32 iRet = A3DAsmModelFileWriteToFile(p, NULL, pcPRCName);

