Overview

Programming Guide

API Reference

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();
    <p>Create the model file entity. (See <a href="building_prc_2.html#1541798">Create a model file entity</a>.)</p>
    
    <li>Save the contents of the model file to a physical file by invoking the <span class='code'>A3DAsmModelFileWriteToFile</span> function.
    
    if (p != NULL) {
    if (_access(pcPRCName, 00) != -1)
    _unlink(pcPRCName);
    A3DInt32 iRet = A3DAsmModelFileWriteToFile(p, NULL, pcPRCName);

  2. Delete the model file populated in Step 1.

NOTE: The Exchange API functions in this chapter are described as though implicit linking were possible. Wherever you see a direct call to one of these functions, you should instead use the pointer to the function. See Implementing external linking.