The Exchange API lets you create a set of attributes named root-level attributes that can be applied to any PRC entity. These attributes are packaged as an A3DRootBase entity that is referenced from the PRC entity they describe.
A3DRootBaseData. This structure has a name and can have pointers to multiple A3DMiscAttribute entities.
A3DMiscAttributeData. This structure has a name and can reference a single A3DMiscSingle structure.
NOTE: See the Exchange API Reference for limitations on including modeler data in the root-level attributes for a PRC entity.
Here is a diagram that shows the structure of the A3DRootBase entity that can be associated with any PRC entity. The A3DMiscSingleAttributeData structures are used only for modeler attributes. The sample code that comes after the following task descriptions exemplifies this structure.
Determine the strings to use for modeler data and the type represented by each string. Here are the possible types and the enumerations that identify them:
Determine the titles to use for each piece of modeler data.
Declare an array to accommodate pointers to the A3DMiscAttributeData entities that you will create in a subsequent step.
For each modeler attribute associated with the root base entity, do the following:
NOTE: Each A3DMiscSingleAttributeData structure that references another A3DMiscSingleAttributeData structure must reference only one such structure and must have the same title as that structure.
Package each A3DMiscAttributeData structure as an A3DMiscAttribute entity by invoking the A3DMiscAttributeCreate function. Save the entity pointer in the array created in Step 3.
Declare and initialize an A3DRootBaseData structure. (See Step 5 in Define miscellaneous attributes that omit modeler data.)
Package the A3DRootBaseData structure as an A3DRootBase entity. (See Step 6 in Define miscellaneous attributes that omit modeler data.)
The following sample code creates base root attributes that describe three sets of modeler data. For information about the relationships between the structures and entities that represent this data, see the diagram provided in Defining root-level attributes for a PRC entity.