A part reference is geometry that is marked as a part. It is an annotative mechanical entity with special behavior that allows it to interact with a Bill of Materials (BOM) and to be included in other drawings or assemblies through external references.
Properties and Features
Part references are special entities with attributes that are used to mark parts in assemblies and populate part data to a Bill of Materials database. Below is an attached and detached part reference.
Part references do not contain much data — a flag that shows whether it is detached and a data entry object that stores all part reference attributes (component properties).
When part references are present in a drawing, there are also BomRow records in dictionaries (BomRow records also appear in a Bill of Materials for further processing)
and data entry objects with part reference data.
A Bill of Materials counts the part references and components. Part reference attributes work like component properties for components. A referenced part could be included in another assembly or drawing, and a Bill of Materials or an external file could be attached to a selected part reference.
Examples
Example of how to extract data from a part reference:
OdDbObjectId dataEntryObjectId = pPartRef->dataEntryId();
Example of how to remove an attribute from a part reference:
OdError errStatus = pPartRef->removeAttribute("DESCRIPTION");