< Home

< Reference Manual

< Supported File Formats

PROGRAMMING GUIDE

Contents

Programming with Exchange

Working with the Exchange API

Parsing a PRC File

Creating a PRC file that uses boundary representation

Creating a tessellation entity for representing faceted objects

Parsing root-base entity data

This section explains how to parse data stored in the root base for a PRC entity. The root base data applies to all PRC entities.

Parse the root-base entity data

  1. Declare and initialize a A3DRootBaseData structure.
    A3DRootBaseData sData;
    A3D_INITIALIZE_DATA(sData);
  2. Populate the A3DRootBaseData structure by invoking the A3DRootBaseGet function.
    A3DInt32 iRet = A3DRootBaseGet(p, &sData);
  3. Save the value of the m_pcName to your export structure.
  4. For each A3DMiscAttribute entity referenced by the array that is referenced by m_ppAttributes, process the contents. (See Parse the miscellaneous attribute entity.)
  5. Delete the A3DRootBaseData structure.
    A3DRootBaseGet(NULL, &sData);

Parse the miscellaneous attribute entity

  1. Declare and initialize an A3DMiscAttributeData structure.
  2. Populate the A3DMiscAttributeData structure by invoking the A3DMiscAttributeGet function. The first argument references the A3DMiscAttribute entity (from root base data m_ppAttributes member), and the second argument references the A3DMiscAttributeData being populated.
  3. Determine whether the root data contains modeler data by checking the m_pSingleAttributesData member. If its value is non-null, save the modeler data to your export structure.
  4. Save the value of the m_pcName attribute to your export structure.
  5. Delete the A3DMiscAttributeData structure created in Step 1.