2.3.1 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

1. Create a pointer that references a populated model file entity. (See Create a model file entity.) In the following example, createModelFile is a private function that returns a pointer to a populated model file.

A3DAsmModelFile* pModelFile = createModelFile();

2. Create the model file entity. (See Create a model file entity.)

3. Save the contents of the model file to a physical file by invoking the A3DAsmModelFileWriteToFile function.

if (p != NULL) {
if (_access(pcPRCName, 00) != -1)
_unlink(pcPRCName);
A3DInt32 iRet = A3DAsmModelFileWriteToFile(p, NULL, pcPRCName);
top_level:1 prog_guide/02:0